home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Source / Cpp4VB / WINTLB / USER.ODL < prev    next >
Text File  |  1996-02-27  |  121KB  |  3,533 lines

  1.  
  2. [
  3. uuid(54674046-3A82-101B-8181-00AA003743D3),
  4. helpstring("Windows User Functions"),
  5. #ifdef WIN32
  6. dllname("USER32.DLL")
  7. #else
  8. dllname("USER.EXE")
  9. #endif
  10. ]
  11. module User {
  12.  
  13.     #ifndef WIN32
  14.     [
  15.     usesgetlasterror,
  16.     entry("GetTickCount"),
  17.     helpstring("Returns milliseconds since Windows was started"),
  18.     ]
  19.     DWORD   WINAPI GetTickCount(void);
  20.  
  21.     [
  22.     usesgetlasterror,
  23.     entry("GetFreeSystemResources"),
  24.     helpstring("Gets percentage of free system resources"),
  25.     ]
  26.     UINT WINAPI GetFreeSystemResources([in] UINT fuSysResource);
  27.     #endif
  28.  
  29.     // ****** System Metrics ********
  30.  
  31.     [
  32.     usesgetlasterror,
  33.     entry("GetSystemMetrics"),
  34.     helpstring("Get Various system metrics and system configuration settings"),
  35.     ]
  36.     int WINAPI GetSystemMetrics([in] int nIndex);
  37.  
  38.     [
  39.     usesgetlasterror,
  40.     entry("GetDoubleClickTime"),
  41.     helpstring("Get current double-click time for the mouse"),
  42.     ]
  43.     UINT    WINAPI GetDoubleClickTime(void);
  44.  
  45.     [
  46.     usesgetlasterror,
  47.     entry("SetDoubleClickTime"),
  48.     helpstring("Sets double-click time for the mouse"),
  49.     ]
  50.     void    WINAPI SetDoubleClickTime([in] UINT uInterval);
  51.  
  52.     // ****** System Parameters support *********
  53.  
  54.     /*
  55.     BOOL    WINAPI SystemParametersInfo(UINT, UINT, VOID FAR*, UINT);
  56.     */
  57.  
  58.     // ****** Rectangle support *****
  59.  
  60.     /*
  61.     void    WINAPI SetRect(RECT FAR*, int, int, int, int);
  62.     void    WINAPI SetRectEmpty(RECT FAR*);
  63.  
  64.     void    WINAPI CopyRect(RECT FAR*, const RECT FAR*);
  65.  
  66.     BOOL    WINAPI IsRectEmpty(const RECT FAR*);
  67.  
  68.     BOOL    WINAPI EqualRect(const RECT FAR*, const RECT FAR*);
  69.  
  70.     BOOL    WINAPI IntersectRect(RECT FAR*, const RECT FAR*, const RECT FAR*);
  71.     BOOL    WINAPI UnionRect(RECT FAR*, const RECT FAR*, const RECT FAR*);
  72.     BOOL    WINAPI SubtractRect(RECT FAR*, const RECT FAR*, const RECT FAR*);
  73.  
  74.     void    WINAPI OffsetRect(RECT FAR*, int, int);
  75.     void    WINAPI InflateRect(RECT FAR*, int, int);
  76.  
  77.     BOOL    WINAPI PtInRect(const RECT FAR*, POINT);
  78.     */
  79.  
  80.     // ****** Window class management *******
  81.  
  82.     /*
  83.     typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  84.  
  85.     typedef struct tagWNDCLASS
  86.     {
  87.         UINT        style;
  88.         WNDPROC lpfnWndProc;
  89.         int         cbClsExtra;
  90.         int         cbWndExtra;
  91.         HINSTANCE   hInstance;
  92.         HICON   hIcon;
  93.         HCURSOR hCursor;
  94.         HBRUSH  hbrBackground;
  95.         LPCSTR  lpszMenuName;
  96.         LPCSTR  lpszClassName;
  97.     } WNDCLASS;
  98.     typedef WNDCLASS* PWNDCLASS;
  99.     typedef WNDCLASS NEAR* NPWNDCLASS;
  100.     typedef WNDCLASS FAR* LPWNDCLASS;
  101.  
  102.     ATOM    WINAPI RegisterClass(const WNDCLASS FAR*);
  103.     BOOL    WINAPI UnregisterClass(LPCSTR, [in] HINSTANCE hInst);
  104.  
  105.     BOOL    WINAPI GetClassInfo([in] HINSTANCE hInst, LPCSTR, WNDCLASS FAR*);
  106.     */
  107.  
  108.     [
  109.     #ifdef WIN32
  110.     usesgetlasterror,
  111.     entry("GetClassNameA"),
  112.     #else
  113.     entry("GetClassName"),
  114.     #endif
  115.     helpstring("Copies the class name of a window handle to a string buffer"),
  116.     ]
  117.     int     WINAPI GetClassName([in] HWND hwnd, [in] LPSTR lpszClassName,
  118.                                 [in] int cchClassName);
  119.  
  120.     // Class words
  121.  
  122.     [
  123.     usesgetlasterror,
  124.     entry("GetClassWord"),
  125.     helpstring("Gets the indexed class WORD data of a window handle (see GWW_ constants)")
  126.     ]
  127.     WORD    WINAPI GetClassWord([in] HWND hwnd, [in] int nIndex);
  128.  
  129.     [
  130.     usesgetlasterror,
  131.     entry("SetClassWord"),
  132.     helpstring("Sets the indexed class WORD data of a window handle and returns previous data (see GWW_ constants)")
  133.     ]
  134.     WORD    WINAPI SetClassWord([in] HWND hwnd, [in] int nIndex,
  135.                                 [in] WORD nValue);
  136.  
  137.     [
  138.     #ifdef WIN32
  139.     usesgetlasterror,
  140.     entry("GetClassLongA"),
  141.     #else
  142.     entry("GetClassLong"),
  143.     #endif
  144.     helpstring("Gets the indexed class LONG data of a window handle (see GWL_ constants)")
  145.     ]
  146.     LONG    WINAPI GetClassLong([in] HWND hwnd, [in] int nIndex);
  147.  
  148.     [
  149.     #ifdef WIN32
  150.     usesgetlasterror,
  151.     entry("SetClassLongA"),
  152.     #else
  153.     entry("SetClassLong"),
  154.     #endif
  155.     helpstring("Sets the indexed class LONG data of a window handle and returns previous data (see GWL_ constants)")
  156.     ]
  157.     LONG    WINAPI SetClassLong([in] HWND hwnd, [in] int nIndex,
  158.                                 [in] LONG nValue);
  159.  
  160.     [
  161.     #ifdef WIN32
  162.     usesgetlasterror,
  163.     entry("GetClassLongA"),
  164.     #else
  165.     entry("GetClassWord"),
  166.     #endif
  167.     helpstring("Gets the indexed class data (WORD or LONG depending on environment) of a window handle (see GWD_ constants)")
  168.     ]
  169.     UINT    WINAPI GetClassData([in] HWND hwnd, [in] int nIndex);
  170.  
  171.     [
  172.     #ifdef WIN32
  173.     usesgetlasterror,
  174.     entry("SetClassLongA"),
  175.     #else
  176.     entry("SetClassWord"),
  177.     #endif
  178.     helpstring("Sets the indexed class data (WORD or LONG depending on environment) of a window handle and returns previous data (see GWD_ constants)")
  179.     ]
  180.     UINT    WINAPI SetClassData([in] HWND hwnd, [in] int nIndex,
  181.                                 [in] UINT nValue);
  182.  
  183.     // ****** Window creation/destroy *******
  184.  
  185.     [
  186.     usesgetlasterror,
  187.     entry("IsWindow"),
  188.     helpstring("Tells whether a window handle is valid")
  189.     ]
  190.     BOOL    WINAPI IsWindow([in] HWND hwnd);
  191.  
  192.     /*
  193.     HWND    WINAPI CreateWindowEx(DWORD, [in] LPCSTR lpsz, [in] LPCSTR lpsz, DWORD, int, int, int, int, HWND, [in] HMENU hmenu, [in] HINSTANCE hInst, void FAR*);
  194.     HWND    WINAPI CreateWindow([in] LPCSTR lpsz, [in] LPCSTR lpsz, DWORD, int, int, int, int, HWND, [in] HMENU hmenu, [in] HINSTANCE hInst, void FAR*);
  195.  
  196.     BOOL    WINAPI DestroyWindow([in] HWND hwnd);
  197.     */
  198.  
  199.     // Basic window attributes
  200.     #ifndef WIN32
  201.     [
  202.     entry("GetWindowTask"),
  203.     helpstring("Returns the owning task (process) of the given window")
  204.     ]
  205.     HTASK   WINAPI GetWindowTask([in] HWND hwnd);
  206.     #else
  207.     [
  208.     usesgetlasterror,
  209.     entry("GetWindowThreadProcessId"),
  210.     helpstring("Returns the ids of both the process and the thread that created a window")
  211.     ]
  212.     DWORD WINAPI GetWindowThreadProcessId([in] HWND hwnd,
  213.                                           [in, out] DWORD * lpdwProcessId);
  214.     #endif
  215.  
  216.     [
  217.     usesgetlasterror,
  218.     entry("IsChild"),
  219.     helpstring("Tells whether the given child window is the child of the given parent window")
  220.     ]
  221.     BOOL    WINAPI IsChild([in] HWND hwndParent, [in] HWND hwndChild);
  222.  
  223. //@B GetParent
  224.     [
  225.     usesgetlasterror,
  226.     entry("GetParent"),
  227.     helpstring("Gets the parent window handle of the given window")
  228.     ]
  229.     HWND    WINAPI GetParent([in] HWND hWnd);
  230. //@E GetParent
  231.  
  232.     [
  233.     usesgetlasterror,
  234.     entry("SetParent"),
  235.     helpstring("Changes the parent of the given window to the specified new parent")
  236.     ]
  237.     HWND    WINAPI SetParent([in] HWND hwndChild, [in] HWND hwndNewParent);
  238.  
  239.     [
  240.     usesgetlasterror,
  241.     entry("IsWindowVisible"),
  242.     helpstring("Tells whether a window is visible")
  243.     ]
  244.     BOOL    WINAPI IsWindowVisible([in] HWND hwnd);
  245.  
  246.     [
  247.     usesgetlasterror,
  248.     entry("ShowWindow"),
  249.     helpstring("Sets a window's visibility state (see SW_ constants)")
  250.     ]
  251.     BOOL    WINAPI ShowWindow([in] HWND hwnd, [in] int nCmdShow);
  252.  
  253.     // Enabled state
  254.  
  255.     [
  256.     usesgetlasterror,
  257.     entry("EnableWindow"),
  258.     helpstring("Enables or disables a window")
  259.     ]
  260.     BOOL    WINAPI EnableWindow([in] HWND hwnd, [in] BOOL fEnable);
  261.  
  262.     [
  263.     usesgetlasterror,
  264.     entry("IsWindowEnabled"),
  265.     helpstring("Tells whether a window is enabled or disabled")
  266.     ]
  267.     BOOL    WINAPI IsWindowEnabled([in] HWND hwnd);
  268.  
  269.     // Window text
  270.  
  271.     [
  272.     #ifdef WIN32
  273.     usesgetlasterror,
  274.     entry("SetWindowTextA"),
  275.     #else
  276.     entry("SetWindowText"),
  277.     #endif
  278.     helpstring("Sets the title of a window"),
  279.     ]
  280.     void    WINAPI SetWindowText([in] HWND hwnd, [in] LPCSTR lpsz);
  281.  
  282.     [
  283.     #ifdef WIN32
  284.     usesgetlasterror,
  285.     entry("GetWindowTextA"),
  286.     #else
  287.     entry("GetWindowText"),
  288.     #endif
  289.     helpstring("Copies no more than cbMax characters of a window title to a string")
  290.     ]
  291.     int     WINAPI GetWindowText([in] HWND hwnd, [in] LPSTR lpsz,
  292.                                  [in] int cbMax);
  293.  
  294.     [
  295.     #ifdef WIN32
  296.     usesgetlasterror,
  297.     entry("GetWindowTextLengthA"),
  298.     #else
  299.     entry("GetWindowTextLength"),
  300.     #endif
  301.     helpstring("Gets the character length of a window title)")
  302.     ]
  303.     int     WINAPI GetWindowTextLength([in] HWND hwnd);
  304.  
  305.     // Window words
  306.  
  307.     [
  308.     usesgetlasterror,
  309.     entry("GetWindowWord"),
  310.     helpstring("Gets the indexed WORD data of a window handle (see GWW_ constants)")
  311.     ]
  312.     WORD    WINAPI GetWindowWord([in] HWND hwnd, [in] int nIndex);
  313.  
  314.     [
  315.     usesgetlasterror,
  316.     entry("SetWindowWord"),
  317.     helpstring("Sets the indexed WORD data of a window handle and returns previous data (see GWW_ constants)")
  318.     ]
  319.     WORD    WINAPI SetWindowWord([in] HWND hwnd, [in] int nIndex,
  320.                                  [in] WORD nValue);
  321.  
  322.     [
  323.     #ifdef WIN32
  324.     usesgetlasterror,
  325.     entry("GetWindowLongA"),
  326.     #else
  327.     entry("GetWindowLong"),
  328.     #endif
  329.     helpstring("Gets the indexed LONG data of a window handle (see GWL_ constants)")
  330.     ]
  331.     LONG    WINAPI GetWindowLong([in] HWND hwnd, [in] int nIndex);
  332.  
  333.     [
  334.     #ifdef WIN32
  335.     usesgetlasterror,
  336.     entry("SetWindowLongA"),
  337.     #else
  338.     entry("SetWindowLong"),
  339.     #endif
  340.     helpstring("Sets the indexed LONG data of a window handle and returns previous data (see GWL_ constants)")
  341.     ]
  342.     LONG    WINAPI SetWindowLong([in] HWND hwnd, [in] int nIndex,
  343.                                  [in] LONG nValue);
  344.  
  345.     [
  346.     #ifdef WIN32
  347.     usesgetlasterror,
  348.     entry("GetWindowLongA"),
  349.     #else
  350.     entry("GetWindowWord"),
  351.     #endif
  352.     helpstring("Gets the indexed data (WORD or LONG depending on environment) of a window handle (see GWD_ constants)")
  353.     ]
  354.     UINT    WINAPI GetWindowData([in] HWND hwnd, [in] int nIndex);
  355.  
  356.     [
  357.     #ifdef WIN32
  358.     usesgetlasterror,
  359.     entry("SetWindowLongA"),
  360.     #else
  361.     entry("SetWindowWord"),
  362.     #endif
  363.     helpstring("Sets the indexed data (WORD or LONG depending on environment) of a window handle and returns previous data (see GWD_ constants)")
  364.     ]
  365.     UINT    WINAPI SetWindowData([in] HWND hwnd, [in] int nIndex,
  366.                                  [in] UINT nValue);
  367.  
  368.     // Window Styles
  369.  
  370.     // ****** Window size, position, Z-order, and visibility *******
  371.  
  372.     /* Omit
  373.     void    WINAPI GetClientRect([in] HWND hwnd, RECT FAR*);
  374.     void    WINAPI GetWindowRect([in] HWND hwnd, RECT FAR*);
  375.  
  376.     typedef struct tagWINDOWPLACEMENT
  377.     {
  378.         UINT  length;
  379.         UINT  flags;
  380.         UINT  showCmd;
  381.         POINT ptMinPosition;
  382.         POINT ptMaxPosition;
  383.         RECT  rcNormalPosition;
  384.     } WINDOWPLACEMENT;
  385.     typedef WINDOWPLACEMENT     *PWINDOWPLACEMENT;
  386.     typedef WINDOWPLACEMENT FAR* LPWINDOWPLACEMENT;
  387.  
  388.     BOOL    WINAPI GetWindowPlacement([in] HWND hwnd, WINDOWPLACEMENT FAR*);
  389.     BOOL    WINAPI SetWindowPlacement([in] HWND hwnd, const WINDOWPLACEMENT FAR*);
  390.     */
  391.  
  392.     [
  393.     usesgetlasterror,
  394.     entry("SetWindowPos"),
  395.     helpstring("Changes the window size, position, and z-order of a window")
  396.     ]
  397.     BOOL    WINAPI SetWindowPos([in] HWND hwnd, [in] HWND hwndInsertAfter,
  398.                                 [in] int x, [in] int y,
  399.                                 [in] int cx, [in] int cy,
  400.                                 [in] UINT fuFlags);
  401.  
  402.     /*
  403.     DECLARE_HANDLE(HDWP);
  404.  
  405.     HDWP    WINAPI BeginDeferWindowPos(int);
  406.     HDWP    WINAPI DeferWindowPos(HDWP, [in] HWND hwnd, [in] HWND hwnd, int, int, int, int, UINT);
  407.     BOOL    WINAPI EndDeferWindowPos(HDWP);
  408.  
  409.     BOOL    WINAPI MoveWindow([in] HWND hwnd, int, int, int, int, BOOL);
  410.     BOOL    WINAPI BringWindowToTop([in] HWND hwnd);
  411.     */
  412.  
  413.     // ****** Window proc implementation & subclassing support *****
  414.  
  415.     // LRESULT WINAPI DefWindowProc([in] HWND hwnd, UINT, WPARAM, LPARAM);
  416.  
  417.     [
  418.     usesgetlasterror,
  419.     #if WIN32
  420.     entry("CallWindowProcA"),
  421.     #else
  422.     entry("CallWindowProc"),
  423.     #endif
  424.     helpstring("Passes message information to a specified window procedure"),
  425.     ]
  426.     LRESULT WINAPI CallWindowProc([in] WNDPROC lpPrevWndFunc,
  427.                                   [in] HWND hwnd, [in] UINT Msg,
  428.                                   [in] WPARAM wParam, [in] LPARAM lParam);
  429.  
  430.     // ****** Main window support ***
  431.  
  432.     /*
  433.     void    WINAPI AdjustWindowRect(RECT FAR*, DWORD, BOOL);
  434.     void    WINAPI AdjustWindowRectEx(RECT FAR*, DWORD, BOOL, DWORD);
  435.  
  436.     void    WINAPI ShowOwnedPopups([in] HWND hwnd, BOOL);
  437.  
  438.     // Obsolete functions
  439.     BOOL    WINAPI OpenIcon([in] HWND hwnd);
  440.     void    WINAPI CloseWindow([in] HWND hwnd);
  441.     BOOL    WINAPI AnyPopup(void);
  442.     */
  443.  
  444.     [
  445.     usesgetlasterror,
  446.     entry("FlashWindow"),
  447.     helpstring("Flashes or unflashes a given window depending on fInvert")
  448.     ]
  449.     BOOL    WINAPI FlashWindow([in] HWND hwnd, [in] BOOL fInvert);
  450.  
  451.     [
  452.     usesgetlasterror,
  453.     entry("IsIconic"),
  454.     helpstring("Tells whether a window is minimized")
  455.     ]
  456.     BOOL    WINAPI IsIconic([in] HWND hwnd);
  457.  
  458.     [
  459.     usesgetlasterror,
  460.     entry("IsZoomed"),
  461.     helpstring("Tells whether a window is maximized"),
  462.     helpcontext(357)
  463.     ]
  464.     BOOL    WINAPI IsZoomed([in] HWND hwnd);
  465.  
  466.     // ****** Window coordinate mapping and hit-testing **************************
  467.  
  468.     /*
  469.     void    WINAPI ClientToScreen([in] HWND hwnd, POINT FAR*);
  470.     void    WINAPI ScreenToClient([in] HWND hwnd, POINT FAR*);
  471.  
  472.     void    WINAPI MapWindowPoints([in] HWND hwnd hwndFrom, [in] HWND hwnd hwndTo, POINT FAR* lppt, UINT cpt);
  473.  
  474.     HWND    WINAPI WindowFromPoint(POINT);
  475.     HWND    WINAPI ChildWindowFromPoint([in] HWND hwnd, POINT);
  476.     */
  477.  
  478.     // ****** Window query and enumeration ******
  479.  
  480.     [
  481.     usesgetlasterror,
  482.     entry("GetDesktopWindow"),
  483.     helpstring("Returns handle of desktop window"),
  484.     ]
  485.     HWND    WINAPI GetDesktopWindow();
  486.  
  487.     [
  488.     #ifdef WIN32
  489.     usesgetlasterror,
  490.     entry("FindWindowA"),
  491.     #else
  492.     entry("FindWindow"),
  493.     #endif
  494.     helpstring("Finds a window by its class name and title"),
  495.     ]
  496.     HWND    WINAPI FindWindow([in] LPCSTR lpszClassName,
  497.                               [in] LPCSTR lpszWindow);
  498.  
  499.     /* Omit
  500.     typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  501.  
  502.     BOOL    WINAPI EnumWindows(WNDENUMPROC, LPARAM);
  503.     BOOL    WINAPI EnumChildWindows(HWND, WNDENUMPROC, LPARAM);
  504.     BOOL    WINAPI EnumTaskWindows(HTASK, WNDENUMPROC, LPARAM);
  505.     */
  506.  
  507.     [
  508.     usesgetlasterror,
  509.     entry("GetTopWindow"),
  510.     helpstring("Gets handle of window at the top of the Z-order of a specified child window"),
  511.     ]
  512.     HWND    WINAPI GetTopWindow([in] HWND hwnd);
  513.  
  514.     [
  515.     usesgetlasterror,
  516.     entry("GetWindow"),
  517.     helpstring("Gets handle of window with specified relationship (GW_HWNDFIRST, GW_HWNDLAST, GW_HWNDNEXT, GW_HWNDPREV, GW_OWNER, GW_CHILD)"),
  518.     ]
  519.     HWND    WINAPI GetWindow([in] HWND hwnd, [in] UINT uCmd);
  520.  
  521.     [
  522.     usesgetlasterror,
  523.     entry("GetNextWindow"),
  524.     helpstring("Gets handle of next (GW_HWNDNEXT) or previous (GW_HWNDPREV) window in the Z-order"),
  525.     ]
  526.     HWND    WINAPI GetNextWindow([in] HWND hwnd, [in] UINT fuDirection);
  527.  
  528.     // ****** Omit Window property support *******
  529.  
  530.     /*
  531.     BOOL    WINAPI SetProp(HWND, LPCSTR, HANDLE);
  532.     HANDLE  WINAPI GetProp(HWND, LPCSTR);
  533.     HANDLE  WINAPI RemoveProp(HWND, LPCSTR);
  534.  
  535.     typedef BOOL (CALLBACK* PROPENUMPROC)(HWND, LPCSTR, HANDLE);
  536.  
  537.     int     WINAPI EnumProps(HWND, PROPENUMPROC);
  538.     */
  539.  
  540.     // ****** Window drawing support ********
  541.  
  542.     [
  543.     usesgetlasterror,
  544.     entry("GetDC"),
  545.     helpstring("Gets client area DC of given window"),
  546.     ]
  547.     HDC     WINAPI GetDC([in] HWND hwnd);
  548.  
  549.     [
  550.     usesgetlasterror,
  551.     entry("ReleaseDC"),
  552.     helpstring("Releases a DC obtained with GetDC or GetWindowDC"),
  553.     ]
  554.     int     WINAPI ReleaseDC([in] HWND hwnd, [in] HDC hdc);
  555.  
  556.     [
  557.     usesgetlasterror,
  558.     entry("GetWindowDC"),
  559.     helpstring("Gets entire DC of given window"),
  560.     ]
  561.     HDC     WINAPI GetWindowDC([in] HWND hwnd);
  562.  
  563.     /*
  564.     HDC     WINAPI GetDCEx(register HWND hwnd, HRGN hrgnClip, DWORD flags);
  565.     */
  566.  
  567.  
  568.     // ****** Window repainting ****
  569.  
  570.  
  571.     /* Omit
  572.     // BeginPaint() return structure
  573.     typedef struct tagPAINTSTRUCT
  574.     {
  575.         HDC     hdc;
  576.         BOOL    fErase;
  577.         RECT    rcPaint;
  578.         BOOL    fRestore;
  579.         BOOL    fIncUpdate;
  580.         BYTE    rgbReserved[16];
  581.     } PAINTSTRUCT;
  582.     typedef PAINTSTRUCT* PPAINTSTRUCT;
  583.     typedef PAINTSTRUCT NEAR* NPPAINTSTRUCT;
  584.     typedef PAINTSTRUCT FAR* LPPAINTSTRUCT;
  585.  
  586.     HDC     WINAPI BeginPaint([in] HWND hwnd, PAINTSTRUCT FAR*);
  587.     void    WINAPI EndPaint([in] HWND hwnd, const PAINTSTRUCT FAR*);
  588.     */
  589.  
  590.     /*
  591.     void    WINAPI UpdateWindow([in] HWND hwnd);
  592.  
  593.     int     WINAPI ExcludeUpdateRgn([in] HDC hdc, [in] HWND hwnd);
  594.     */
  595.  
  596.     [
  597.     usesgetlasterror,
  598.     entry("LockWindowUpdate"),
  599.     helpstring("Disables drawing in the given window, or enables drawing in the locked window if NULL is passed"),
  600.     ]
  601.     BOOL    WINAPI LockWindowUpdate([in] HWND hwndLock);
  602.  
  603.     /*
  604.     BOOL    WINAPI GetUpdateRect([in] HWND hwnd, RECT FAR*, BOOL);
  605.     int     WINAPI GetUpdateRgn([in] HWND hwnd, HRGN, BOOL);
  606.  
  607.     void    WINAPI InvalidateRect([in] HWND hwnd, const RECT FAR*, BOOL);
  608.     void    WINAPI ValidateRect([in] HWND hwnd, const RECT FAR*);
  609.  
  610.     void    WINAPI InvalidateRgn([in] HWND hwnd, HRGN, BOOL);
  611.     void    WINAPI ValidateRgn([in] HWND hwnd, HRGN);
  612.  
  613.     BOOL    WINAPI RedrawWindow([in] HWND hwnd, const RECT FAR* lprcUpdate, HRGN hrgnUpdate, UINT flags);
  614.     */
  615.  
  616.     // ****** Window scrolling *****
  617.  
  618.     /*
  619.     void     WINAPI ScrollWindow([in] HWND hwnd, int, int, const RECT FAR*, const RECT FAR*);
  620.     BOOL    WINAPI ScrollDC([in] HDC hdc, int, int, const RECT FAR*, const RECT FAR*, HRGN, RECT FAR*);
  621.  
  622.     int     WINAPI ScrollWindowEx([in] HWND hwnd hwnd, int dx, int dy,
  623.                     const RECT FAR* prcScroll, const RECT FAR* prcClip,
  624.                     HRGN hrgnUpdate, RECT FAR* prcUpdate, UINT flags);
  625.     */
  626.  
  627.     // ****** Window activation ****
  628.  
  629.     [
  630.     usesgetlasterror,
  631.     entry("SetActiveWindow"),
  632.     #ifdef WIN32
  633.     helpstring("Makes the specified top level window the active window"),
  634.     #else
  635.     helpstring("Makes the specified top level window associated with the calling thread the active window"),
  636.     #endif
  637.     ]
  638.     HWND    WINAPI SetActiveWindow([in] HWND hwnd);
  639.  
  640.     [
  641.     usesgetlasterror,
  642.     entry("GetActiveWindow"),
  643.     helpstring("Gets the handle of the active window"),
  644.     ]
  645.     HWND    WINAPI GetActiveWindow(void);
  646.  
  647.     #ifdef WIN32
  648.     [
  649.     usesgetlasterror,
  650.     entry("SetForegroundWindow"),
  651.     helpstring("Activates the thread and the window of the specified window handle"),
  652.     ]
  653.     BOOL    WINAPI SetForegroundWindow([in] HWND hWnd);
  654.  
  655.     [
  656.     usesgetlasterror,
  657.     entry("GetForegroundWindow"),
  658.     helpstring("Gets the handle of the foreground window"),
  659.     ]
  660.     HWND    WINAPI GetForegroundWindow(VOID);
  661.     #endif
  662.  
  663.  
  664.     /*
  665.     HWND    WINAPI GetLastActivePopup([in] HWND hwnd);
  666.     */
  667.  
  668.     // ****** Keyboard input support ********
  669.  
  670.     [
  671.     usesgetlasterror,
  672.     entry("SetFocus"),
  673.     helpstring("Sets keyboard input focus to given window, returning previous focus window if successful"),
  674.     ]
  675.     HWND    WINAPI SetFocus([in] HWND hwnd);
  676.  
  677.     [
  678.     usesgetlasterror,
  679.     entry("GetFocus"),
  680.     helpstring("Returns handle of window with keyboard input focus"),
  681.     ]
  682.     HWND    WINAPI GetFocus(void);
  683.  
  684.     [
  685.     usesgetlasterror,
  686.     entry("GetKeyState"),
  687.     helpstring("Gets state of a Windows virtual keys"),
  688.     ]
  689.     short WINAPI GetKeyState([in] int nKeyState);
  690.  
  691.     [
  692.     usesgetlasterror,
  693.     entry("GetAsyncKeyState"),
  694.     helpstring("Gets asynchronouse state of a Windows virtual keys"),
  695.     ]
  696.     short WINAPI GetAsyncKeyState([in] int nKeyState);
  697.  
  698.     [
  699.     usesgetlasterror,
  700.     entry("GetKeyboardState"),
  701.     helpstring("Gets an array of 256 bytes representing the state of Windows virtual keys"),
  702.     ]
  703.     void    WINAPI GetKeyboardState([in] BYTE FAR* lpbKeyState);
  704.  
  705.     [
  706.     usesgetlasterror,
  707.     entry("SetKeyboardState"),
  708.     helpstring("Sets an array of 256 bytes representing the state of Windows virtual keys"),
  709.     ]
  710.     void    WINAPI SetKeyboardState([out] BYTE FAR* lpbKeyState);
  711.  
  712.     // ****** Mouse input support **
  713.  
  714.     [
  715.     usesgetlasterror,
  716.     entry("SetCapture"),
  717.     helpstring("Sets capture of all mouse events regardless of cursor position to the given window"),
  718.     ]
  719.     HWND    WINAPI SetCapture([in] HWND hwnd);
  720.  
  721.     [
  722.     usesgetlasterror,
  723.     entry("SetCapture"),
  724.     helpstring("Releases mouse capture and restores normal mouse input processing"),
  725.     ]
  726.     void    WINAPI ReleaseCapture(void);
  727.  
  728.     [
  729.     usesgetlasterror,
  730.     entry("GetCapture"),
  731.     helpstring("Gets the window handle (if any) that owns mouse capture"),
  732.     ]
  733.     HWND    WINAPI GetCapture(void);
  734.  
  735.     /*
  736.     BOOL    WINAPI SwapMouseButton(BOOL);
  737.  
  738.     typedef struct tagMOUSEHOOKSTRUCT
  739.     {
  740.         POINT   pt;
  741.         HWND    hwnd;
  742.         UINT    wHitTestCode;
  743.         DWORD   dwExtraInfo;
  744.     } MOUSEHOOKSTRUCT;
  745.     typedef MOUSEHOOKSTRUCT  FAR* LPMOUSEHOOKSTRUCT;
  746.     */
  747.  
  748.     // ****** System modal window support *******
  749.  
  750.     /*
  751.     HWND    WINAPI GetSysModalWindow(void);
  752.     HWND    WINAPI SetSysModalWindow([in] HWND hwnd);
  753.     */
  754.  
  755.     // ****** Omit Timer support ********
  756.  
  757.     /*
  758.     typedef void (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  759.  
  760.     UINT    WINAPI SetTimer(HWND, UINT, UINT, TIMERPROC);
  761.  
  762.     BOOL    WINAPI KillTimer(HWND, UINT);
  763.     */
  764.  
  765.     // ****** Omit Accelerator support ******
  766.  
  767.     /*
  768.     DECLARE_HANDLE(HACCEL);
  769.  
  770.     HACCEL  WINAPI LoadAccelerators([in] HINSTANCE hInst, LPCSTR);
  771.  
  772.     int     WINAPI TranslateAccelerator(HWND, HACCEL, MSG FAR*);
  773.     */
  774.  
  775.     // ****** Menu support *********
  776.  
  777.     /*
  778.     // Menu template header
  779.     typedef struct
  780.     {
  781.         UINT    versionNumber;
  782.         UINT    offset;
  783.     } MENUITEMTEMPLATEHEADER;
  784.  
  785.     // Menu template item struct
  786.     typedef struct
  787.     {
  788.         UINT    mtOption;
  789.         UINT    mtID;
  790.         char    mtString[1];
  791.     } MENUITEMTEMPLATE;
  792.     */
  793.  
  794.     [
  795.     usesgetlasterror,
  796.     entry("IsMenu"),
  797.     helpstring("Tells whether a handle is a menu handle")
  798.     ]
  799.     BOOL    WINAPI IsMenu([in] HMENU hmenu);
  800.  
  801.     [
  802.     usesgetlasterror,
  803.     entry("CreateMenu"),
  804.     helpstring("Creates an empty menu and returns its handle")
  805.     ]
  806.     HMENU   WINAPI CreateMenu(VOID);
  807.  
  808.     [
  809.     usesgetlasterror,
  810.     entry("CreatePopupMenu"),
  811.     helpstring("Creates an empty pop-up menu and returns its handle")
  812.     ]
  813.     HMENU   WINAPI CreatePopupMenu(VOID);
  814.  
  815.     [
  816.     #if WIN32
  817.     usesgetlasterror,
  818.     entry("LoadMenuA"),
  819.     #else
  820.     entry("LoadMenu"),
  821.     #endif
  822.     helpstring("Loads menu resource lpszMenuName into an instance"),
  823.     ]
  824.     HMENU   WINAPI LoadMenu([in] HINSTANCE hInst,
  825.                             [in] LPCSTR lpszMenuName);
  826.  
  827.     [
  828.     #if WIN32
  829.     usesgetlasterror,
  830.     entry("LoadMenuA"),
  831.     #else
  832.     entry("LoadMenu"),
  833.     #endif
  834.     helpstring("Loads menu resource idMenuName into an instance"),
  835.     ]
  836.     HMENU   WINAPI LoadMenuAsId([in] HINSTANCE hInst,
  837.                                 [in] LONG idMenuName);
  838.  
  839.     /* Omitted
  840.     HMENU   WINAPI LoadMenuIndirect(const void FAR*);
  841.     */
  842.  
  843.     [
  844.     usesgetlasterror,
  845.     entry("DestroyMenu"),
  846.     helpstring("Destroys the given menu and frees its resources"),
  847.     ]
  848.     BOOL    WINAPI DestroyMenu([in] HMENU hMenu);
  849.  
  850.     [
  851.     usesgetlasterror,
  852.     entry("GetMenu"),
  853.     helpstring("Gets the handle of the menu of the given window"),
  854.     ]
  855.     HMENU   WINAPI GetMenu([in] HWND hwnd);
  856.  
  857.     [
  858.     usesgetlasterror,
  859.     entry("SetMenu"),
  860.     helpstring("Sets the given window's menu to the given menu handle"),
  861.     ]
  862.     BOOL    WINAPI SetMenu([in] HWND hwnd, [in] HMENU hMenu);
  863.  
  864.     [
  865.     usesgetlasterror,
  866.     entry("GetSystemMenu"),
  867.     helpstring("Gets handle of a copy of system menu, or restores the system menu if fRevert is true"),
  868.     ]
  869.     HMENU   WINAPI GetSystemMenu([in] HWND hwnd, [in] BOOL fRevert);
  870.  
  871.     [
  872.     usesgetlasterror,
  873.     entry("DrawMenuBar"),
  874.     helpstring("Redraws the menu bar of the given window"),
  875.     ]
  876.     void    WINAPI DrawMenuBar([in] HWND hwnd);
  877.  
  878.     [
  879.     usesgetlasterror,
  880.     entry("HiliteMenuItem"),
  881.     helpstring("Changes menu hilite of idHiliteItem in top level menu hMenu in hWnd window according to fuHilite flags (MF_ constant)"),
  882.     ]
  883.     BOOL    WINAPI HiliteMenuItem([in] HWND hwnd, [in] HMENU hMenu,
  884.                                   [in] UINT idHiliteItem,
  885.                                   [in] UINT fuHilite);
  886.  
  887.     [
  888.     #if WIN32
  889.     usesgetlasterror,
  890.     entry("InsertMenuA"),
  891.     #else
  892.     entry("InsertMenu"),
  893.     #endif
  894.     helpstring("Inserts new item with ID idNewItem and content lpNewItem into menu hMenu before item idItem according to fuFlags"),
  895.     ]
  896.     BOOL    WINAPI InsertMenu([in] HMENU hMenu, [in] UINT idItem,
  897.                               [in] UINT fuFlags, [in] UINT idNewItem,
  898.                               [in] LPCSTR lpNewItem);
  899.  
  900.     [
  901.     #if WIN32
  902.     usesgetlasterror,
  903.     entry("AppendMenuA"),
  904.     #else
  905.     entry("AppendMenu"),
  906.     #endif
  907.     helpstring("Appends new item with ID idNewItem and content lpNewItem to the end of menu hMenu according to fuFlags"),
  908.     ]
  909.     BOOL    WINAPI AppendMenu([in] HMENU hMenu, [in] UINT fuFlags,
  910.                               [in] UINT idNewItem, [in] LPCSTR lpNewItem);
  911.  
  912.     [
  913.     #if WIN32
  914.     usesgetlasterror,
  915.     entry("ModifyMenuA"),
  916.     #else
  917.     entry("ModifyMenu"),
  918.     #endif
  919.     helpstring("Modifies item with ID idItem of menu hMenu to ID idNewItem and content lpNewItem according to fuFlags"),
  920.     ]
  921.     BOOL    WINAPI ModifyMenu([in] HMENU hMenu, [in] UINT idItem,
  922.                               [in] UINT fuFlags, [in] UINT idNewItem,
  923.                               [in] LPCSTR lpNewItem);
  924.  
  925.     [
  926.     usesgetlasterror,
  927.     entry("RemoveMenu"),
  928.     helpstring("Deletes item with ID idItem (according to fuFlags) from menu hMenu"),
  929.     ]
  930.     BOOL    WINAPI RemoveMenu([in] HMENU hMenu, [in] UINT idItem,
  931.                               [in] UINT fuFlags);
  932.  
  933.     [
  934.     usesgetlasterror,
  935.     entry("DeleteMenu"),
  936.     helpstring("Removes a popup menu item with ID idItem (according to fuFlags) from menu hMenu (should come from GetSubMenu) without deleting menu handle"),
  937.     ]
  938.     BOOL    WINAPI DeleteMenu([in] HMENU hMenu, [in] UINT idItem,
  939.                               [in] UINT fuFlags);
  940.  
  941.     /* Omit (obsolete)
  942.     BOOL    WINAPI ChangeMenu([in] HMENU hMenu, UINT, LPCSTR, UINT, UINT);
  943.     */
  944.  
  945.     [
  946.     usesgetlasterror,
  947.     entry("EnableMenuItem"),
  948.     helpstring("Enables or disables item idEnableItem in hMenu according to uEnable flags"),
  949.     ]
  950.     BOOL    WINAPI EnableMenuItem([in] HMENU hMenu,
  951.                                   [in] UINT idEnableItem,
  952.                                   [in] UINT uEnable);
  953.  
  954.     [
  955.     usesgetlasterror,
  956.     entry("CheckMenuItem"),
  957.     helpstring("Checks or unchecks item idCheckItem in hMenu according to uCheck flags"),
  958.     ]
  959.     BOOL    WINAPI CheckMenuItem([in] HMENU hMenu, [in] UINT idCheckItem,
  960.                                  [in] UINT uCheck);
  961.     [
  962.     usesgetlasterror,
  963.     entry("GetSubMenu"),
  964.     helpstring("Returns handle of handle of the submenu at position nPos in menu hMenu"),
  965.     ]
  966.     HMENU   WINAPI GetSubMenu([in] HMENU hMenu, [in] int nPos);
  967.  
  968.     [
  969.     usesgetlasterror,
  970.     entry("GetMenuItemCount"),
  971.     helpstring("Returns the number of items in a menu"),
  972.     ]
  973.     int     WINAPI GetMenuItemCount([in] HMENU hMenu);
  974.  
  975.     [
  976.     usesgetlasterror,
  977.     entry("GetMenuItemID"),
  978.     helpstring("Returns the ID of item as given position in a menu"),
  979.     ]
  980.     UINT    WINAPI GetMenuItemID([in] HMENU hMenu, [in] int pos);
  981.  
  982.     [
  983.     #if WIN32
  984.     usesgetlasterror,
  985.     entry("GetMenuStringA"),
  986.     #else
  987.     entry("GetMenuString"),
  988.     #endif
  989.     helpstring("Copies the text of item idItem (according to fuFlags) in menu hMenu into the buffer lpsz"),
  990.     ]
  991.     int     WINAPI GetMenuString([in] HMENU hMenu, [in] UINT idItem,
  992.                                  [in, out] LPSTR lpsz, [in] int cbMax,
  993.                                  [in] UINT fuFlags);
  994.  
  995.     [
  996.     usesgetlasterror,
  997.     entry("GetMenuState"),
  998.     helpstring("Returns bitflag state of item idItem in menu hMenu according to fuFlags"),
  999.     ]
  1000.     UINT    WINAPI GetMenuState([in] HMENU hMenu, [in] UINT idItem,
  1001.                                 [in] UINT fuFlags);
  1002.  
  1003.     [
  1004.     usesgetlasterror,
  1005.     entry("SetMenuItemBitmaps"),
  1006.     helpstring("Sets item idItem (according to fuFlags) of menu hMenu to the given bitmaps"),
  1007.     ]
  1008.     BOOL    WINAPI SetMenuItemBitmaps([in] HMENU hMenu, [in] UINT idItem,
  1009.                                       [in] UINT fuFlags,
  1010.                                       [in] HBITMAP hbmUnchecked,
  1011.                                       [in] HBITMAP hbmChecked);
  1012.  
  1013.     [
  1014.     usesgetlasterror,
  1015.     entry("GetMenuCheckMarkDimensions"),
  1016.     helpstring("Returns dimensions of default checkmark bitmap with width in pixels in low word and height in high word"),
  1017.     ]
  1018.     DWORD   WINAPI GetMenuCheckMarkDimensions(VOID);
  1019.  
  1020.     /* Omitted (can't implement)
  1021.     BOOL    WINAPI TrackPopupMenu([in] HMENU hMenu, [in] UINT fuFlags,
  1022.                                       [in] int x, [in] int y,
  1023.                                       [in] int nReserved, [in] HWND hwnd,
  1024.                                       [in, out] LONG lprc);
  1025.     */
  1026.  
  1027.     // ****** Scroll bar support ***
  1028.  
  1029.     [
  1030.     usesgetlasterror,
  1031.     entry("SetScrollPos"),
  1032.     helpstring("Sets the scroll box position and optionally redraws the scroll bar (see SB_ constants)"),
  1033.     ]
  1034.     int     WINAPI SetScrollPos([in] HWND hwnd, [in] int fnBar,
  1035.                                 [in] int nPos, [in] BOOL fRepaint);
  1036.  
  1037.     [
  1038.     usesgetlasterror,
  1039.     entry("GetScrollPos"),
  1040.     helpstring("Gets the scroll box position (see SB_ constants)"),
  1041.     ]
  1042.     int     WINAPI GetScrollPos([in] HWND hwnd, [in] int fnBar);
  1043.  
  1044.     [
  1045.     usesgetlasterror,
  1046.     entry("SetScrollRange"),
  1047.     helpstring("Sets the minimum and maximum positions of a scroll bar and optionally redraws it (see SB_ constants)"),
  1048.     ]
  1049.     void    WINAPI SetScrollRange([in] HWND hwnd, [in] int fnBar,
  1050.                                   [in] int nMin, [in] int nMax,
  1051.                                   [in] BOOL fRedraw);
  1052.  
  1053. //@B GetScrollRange
  1054.     [
  1055.     usesgetlasterror,
  1056.     entry("GetScrollRange"),
  1057.     helpstring("Gets the minimum and maximum positions of a scroll bar"),
  1058.     ]
  1059.     void    WINAPI GetScrollRange([in] HWND hwnd, [in] int fnBar,
  1060.                                   [out] int FAR * lpnMinPos,
  1061.                                   [out] int FAR * lpnMaxPos);
  1062. //@E GetScrollRange
  1063.  
  1064.     [
  1065.     usesgetlasterror,
  1066.     entry("ShowScrollBar"),
  1067.     helpstring("Shows or hides a scroll bar (see SB_ constants)"),
  1068.     ]
  1069.     void    WINAPI ShowScrollBar([in] HWND hwnd, [in] int fnBar,
  1070.                                  [in] BOOL fShow);
  1071.  
  1072.     [
  1073.     usesgetlasterror,
  1074.     entry("EnableScrollBar"),
  1075.     helpstring("Enables or disables scroll bar arrows (see SB_ and ESB_ constants)"),
  1076.     ]
  1077.     BOOL    WINAPI EnableScrollBar([in] HWND hwnd, [in] int fnSBFlags,
  1078.                                    [in] UINT fuArrowFlags);
  1079.  
  1080.     // ******* Clipboard manager ******
  1081.  
  1082.     /*
  1083.     // Clipboard Manager Functions
  1084.     BOOL    WINAPI OpenClipboard([in] HWND hwnd);
  1085.     BOOL    WINAPI CloseClipboard(void);
  1086.     BOOL    WINAPI EmptyClipboard(void);
  1087.  
  1088.     HWND    WINAPI GetOpenClipboardWindow(void);
  1089.  
  1090.     HWND    WINAPI GetClipboardOwner(void);
  1091.  
  1092.     HWND    WINAPI SetClipboardViewer(HWND);
  1093.     HWND    WINAPI GetClipboardViewer(void);
  1094.  
  1095.     HANDLE  WINAPI SetClipboardData(UINT, HANDLE);
  1096.     HANDLE  WINAPI GetClipboardData(UINT);
  1097.  
  1098.     BOOL    WINAPI IsClipboardFormatAvailable(UINT);
  1099.     int     WINAPI GetPriorityClipboardFormat(UINT FAR*, int);
  1100.  
  1101.     UINT    WINAPI RegisterClipboardFormat(LPCSTR);
  1102.     int     WINAPI CountClipboardFormats(void);
  1103.     UINT    WINAPI EnumClipboardFormats(UINT);
  1104.     int     WINAPI GetClipboardFormatName(UINT, LPSTR, int);
  1105.  
  1106.     BOOL    WINAPI ChangeClipboardChain([in] HWND hwnd, [in] HWND hwnd);
  1107.     */
  1108.  
  1109.     // ****** Mouse cursor support **
  1110.  
  1111.     [
  1112.     #ifdef WIN32
  1113.     usesgetlasterror,
  1114.     entry("LoadCursorA"),
  1115.     #else
  1116.     entry("LoadCursor"),
  1117.     #endif
  1118.     helpstring("Load a cursor given by ID number from resource and return the cursor handle"),
  1119.     ]
  1120.     HCURSOR WINAPI LoadCursorAsId([in] HINSTANCE hInst, [in] LONG idCursor);
  1121.  
  1122.     [
  1123.     #ifdef WIN32
  1124.     usesgetlasterror,
  1125.     entry("LoadCursorA"),
  1126.     #else
  1127.     entry("LoadCursor"),
  1128.     #endif
  1129.     helpstring("Load a cursor given by string name from resource and return the cursor handle"),
  1130.     ]
  1131.     HCURSOR WINAPI LoadCursor([in] HINSTANCE hInst, [in] LPSTR pszCursor);
  1132.  
  1133.     [
  1134.     #ifdef WIN32
  1135.     usesgetlasterror,
  1136.     entry("LoadCursorA"),
  1137.     #else
  1138.     entry("LoadCursor"),
  1139.     #endif
  1140.     helpstring("Load a cursor given by string name from resource and return the cursor handle"),
  1141.     ]
  1142.     HCURSOR WINAPI LoadCursorAsStr([in] HINSTANCE hInst, [in] LPSTR pszCursor);
  1143.  
  1144.     [
  1145.     usesgetlasterror,
  1146.     entry("DestroyCursor"),
  1147.     helpstring("Destroys a cursor previously created with CreateCursor or LoadCursor and frees its memory"),
  1148.     ]
  1149.     BOOL    WINAPI DestroyCursor([in] HCURSOR hcur);
  1150.  
  1151.     [
  1152.     usesgetlasterror,
  1153.     entry("SetCursor"),
  1154.     helpstring("Changes the current cursor to the given cursor or removes the cursor if NULL is passed (returns previous)"),
  1155.     ]
  1156.     HCURSOR WINAPI SetCursor([in] HCURSOR hcur);
  1157.  
  1158.     [
  1159.     usesgetlasterror,
  1160.     entry("GetCursor"),
  1161.     helpstring("Gets the handle of the current cursor"),
  1162.     ]
  1163.     HCURSOR WINAPI GetCursor(void);
  1164.  
  1165.     /*
  1166.     HCURSOR WINAPI CreateCursor([in] HINSTANCE hInst, int, int, int, int, const void FAR*, const void FAR*);
  1167.     HCURSOR WINAPI CopyCursor([in] HINSTANCE hInst, [in] HCURSOR hcur);
  1168.     */
  1169.  
  1170.     [
  1171.     usesgetlasterror,
  1172.     entry("ShowCursor"),
  1173.     helpstring("Show or hide the mouse cursor"),
  1174.     ]
  1175.     int     WINAPI ShowCursor([in] BOOL bShow);
  1176.  
  1177.     [
  1178.     usesgetlasterror,
  1179.     entry("SetCursorPos"),
  1180.     helpstring("Sets the mouse cursor position"),
  1181.     ]
  1182.     void    WINAPI SetCursorPos([in] int x, [in] int y);
  1183.  
  1184.     [
  1185.     usesgetlasterror,
  1186.     entry("GetCursorPos"),
  1187.     helpstring("Gets the mouse cursor position"),
  1188.     ]
  1189.     void    WINAPI GetCursorPos([in, out] int FAR * lpPoint);
  1190.  
  1191.     [
  1192.     usesgetlasterror,
  1193.     entry("ClipCursor"),
  1194.     helpstring("Confines the mouse cursor to a given rectangle"),
  1195.     ]
  1196.     void    WINAPI ClipCursor([in] int FAR * lpRect);
  1197.  
  1198.     [
  1199.     usesgetlasterror,
  1200.     entry("GetClipCursor"),
  1201.     helpstring("Gets the rectangle where the mouse cursor is confined"),
  1202.     ]
  1203.     void    WINAPI GetClipCursor([in, out] int FAR * lpRect);
  1204.  
  1205.     // ****** Bitmap resource **********
  1206.  
  1207.     [
  1208.     #ifdef WIN32
  1209.     usesgetlasterror,
  1210.     entry("LoadBitmapA"),
  1211.     #else
  1212.     entry("LoadBitmap"),
  1213.     #endif
  1214.     helpstring("Load a bitmap given by ID number from resource and return bitmap handle"),
  1215.     ]
  1216.     HBITMAP WINAPI LoadBitmapAsId([in] HINSTANCE hInst, [in] LONG idBitmap);
  1217.  
  1218.     [
  1219.     #ifdef WIN32
  1220.     usesgetlasterror,
  1221.     entry("LoadBitmapA"),
  1222.     #else
  1223.     entry("LoadBitmap"),
  1224.     #endif
  1225.     helpstring("Load a bitmap given by string name from resource and return bitmap handle"),
  1226.     ]
  1227.     HBITMAP WINAPI LoadBitmap([in] HINSTANCE hInst, [in] LPSTR pszBitmap);
  1228.  
  1229.     [
  1230.     #ifdef WIN32
  1231.     usesgetlasterror,
  1232.     entry("LoadBitmapA"),
  1233.     #else
  1234.     entry("LoadBitmap"),
  1235.     #endif
  1236.     helpstring("Load a bitmap given by string name from resource and return bitmap handle"),
  1237.     ]
  1238.     HBITMAP WINAPI LoadBitmapAsStr([in] HINSTANCE hInst, [in] LPSTR pszBitmap);
  1239.  
  1240.     // ****** String resource **********
  1241.  
  1242.     [
  1243.     #ifdef WIN32
  1244.     usesgetlasterror,
  1245.     entry("LoadStringA"),
  1246.     #else
  1247.     entry("LoadString"),
  1248.     #endif
  1249.     helpstring("Load a string given by ID number from resource into string buffer and return string length"),
  1250.     ]
  1251.     int     WINAPI LoadString([in] HINSTANCE hInst, [in] UINT idResource,
  1252.                               [in] LPCSTR lpszBuffer, [in] int cbBuffer);
  1253.  
  1254.     // ****** Icon support **********
  1255.  
  1256.     [
  1257.     #ifdef WIN32
  1258.     usesgetlasterror,
  1259.     entry("LoadIconA"),
  1260.     #else
  1261.     entry("LoadIcon"),
  1262.     #endif
  1263.     helpstring("Load an icon given by ID number from resource and return bitmap handle"),
  1264.     ]
  1265.     HICON WINAPI LoadIconAsId([in] HINSTANCE hInst, [in] LONG idIcon);
  1266.  
  1267.     [
  1268.     #ifdef WIN32
  1269.     usesgetlasterror,
  1270.     entry("LoadIconA"),
  1271.     #else
  1272.     entry("LoadIcon"),
  1273.     #endif
  1274.     helpstring("Load an bitmap given by string name from resource and return icon handle"),
  1275.     ]
  1276.     HICON WINAPI LoadIcon([in] HINSTANCE hInst, [in] LPSTR pszIcon);
  1277.  
  1278.     [
  1279.     #ifdef WIN32
  1280.     usesgetlasterror,
  1281.     entry("LoadIconA"),
  1282.     #else
  1283.     entry("LoadIcon"),
  1284.     #endif
  1285.     helpstring("Load an icon given by string name from resource and return icon handle"),
  1286.     ]
  1287.     HICON WINAPI LoadIconAsStr([in] HINSTANCE hInst, [in] LPSTR pszIcon);
  1288.  
  1289.     [
  1290.     usesgetlasterror,
  1291.     entry("DestroyIcon"),
  1292.     helpstring("Destroys an icon previously created with CreateIcon or LoadIcon and frees its memory"),
  1293.     ]
  1294.     BOOL    WINAPI DestroyIcon([in] HICON hicon);
  1295.  
  1296.     [
  1297.     usesgetlasterror,
  1298.     entry("DrawIcon"),
  1299.     helpstring("Draws an icon into the given device context at the given coordinates"),
  1300.     ]
  1301.     BOOL    WINAPI DrawIcon([in] HDC hdc, [in] int x, [in] int y,
  1302.                             [in] HICON hicon);
  1303.  
  1304.     /*
  1305.     HICON   WINAPI CreateIcon([in] HINSTANCE hInst, int, int, BYTE, BYTE, const void FAR*, const void FAR*);
  1306.     HICON   WINAPI CopyIcon([in] HINSTANCE hInst, [in] HICON hicon);
  1307.     */
  1308.  
  1309.     // Image support
  1310.  
  1311.     #ifdef WIN32
  1312.     [
  1313.     usesgetlasterror,
  1314.     entry("LoadImageA"),
  1315.     helpstring("Loads icon, bitmap, or cursor and returns handle"),
  1316.     ]
  1317.     HANDLE  WINAPI LoadImage([in] HINSTANCE hinst,
  1318.                              [in] LPCSTR lpszName, [in] UINT uType,
  1319.                              [in] int cxDesired, [in] int cyDesired,
  1320.                              [in] UINT fuLoad);
  1321.  
  1322.     [
  1323.     usesgetlasterror,
  1324.     entry("CopyImage"),
  1325.     helpstring("Copies icon, bitmap, or cursor to new image, stretching if necessary"),
  1326.     ]
  1327.     HICON   WINAPI CopyImage([in] HANDLE hImage, [in] UINT uType,
  1328.                              [in] int cxDesired, [in] int cyDesired,
  1329.                              [in] UINT fuFlags);
  1330.  
  1331.     [
  1332.     usesgetlasterror,
  1333.     entry("DrawIconEx"),
  1334.     helpstring("Draws an icon or cursor with specified raster and stretching as required"),
  1335.     ]
  1336.     BOOL WINAPI DrawIconEx([in] HDC hdc, [in] int xLeft, [in] int yTop,
  1337.                            [in] HICON hIcon,
  1338.                            [in] int cxWidth, [in] int cyWidth,
  1339.                            [in] UINT istepIfAniCur,
  1340.                            [in] HBRUSH hbrFlickerFreeDraw,
  1341.                            [in] UINT diFlags);
  1342.     #endif // WIN32
  1343.  
  1344.     // ****** Message Box support **
  1345.  
  1346.     /*
  1347.     int     WINAPI MessageBox([in] HWND hwnd, LPCSTR, LPCSTR, UINT);
  1348.     void    WINAPI MessageBeep(UINT);
  1349.     */
  1350.  
  1351.     // ****** Caret support *********
  1352.  
  1353.     /*
  1354.     void    WINAPI CreateCaret([in] HWND hwnd, [in] HBITMAP hbm, int, int);
  1355.     void    WINAPI DestroyCaret(void);
  1356.  
  1357.     void    WINAPI SetCaretPos(int, int);
  1358.     void    WINAPI GetCaretPos(POINT FAR*);
  1359.  
  1360.     void    WINAPI HideCaret([in] HWND hwnd);
  1361.     void    WINAPI ShowCaret([in] HWND hwnd);
  1362.  
  1363.     UINT    WINAPI GetCaretBlinkTime(void);
  1364.     void    WINAPI SetCaretBlinkTime(UINT);
  1365.     */
  1366.  
  1367.     // ****** MDI Support **********
  1368.  
  1369.     /*
  1370.     // CreateWindow lpParams structure for creating MDI client
  1371.     typedef struct tagCLIENTCREATESTRUCT
  1372.     {
  1373.         HMENU  hWindowMenu;
  1374.         UINT   idFirstChild;
  1375.     } CLIENTCREATESTRUCT;
  1376.     typedef CLIENTCREATESTRUCT FAR* LPCLIENTCREATESTRUCT;
  1377.  
  1378.     // MDI client style bits
  1379.  
  1380.     LRESULT WINAPI DefFrameProc([in] HWND hwnd, [in] HWND hwnd, UINT, WPARAM, LPARAM);
  1381.     LRESULT WINAPI DefMDIChildProc([in] HWND hwnd, UINT, WPARAM, LPARAM);
  1382.  
  1383.     BOOL    WINAPI TranslateMDISysAccel([in] HWND hwnd, MSG FAR*);
  1384.  
  1385.     UINT    WINAPI ArrangeIconicWindows([in] HWND hwnd);
  1386.     */
  1387.  
  1388.     // ****** Dialog and Control Management *****
  1389.  
  1390.     /*
  1391.     typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  1392.  
  1393.     BOOL    WINAPI IsDialogMessage([in] HWND hwnd, MSG FAR*);
  1394.  
  1395.     LRESULT WINAPI DefDlgProc([in] HWND hwnd, UINT, WPARAM, LPARAM);
  1396.  
  1397.     HWND    WINAPI CreateDialog([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC);
  1398.     HWND    WINAPI CreateDialogIndirect([in] HINSTANCE hInst, const void FAR*, [in] HWND hwnd, DLGPROC);
  1399.     HWND    WINAPI CreateDialogParam([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC, LPARAM);
  1400.     HWND    WINAPI CreateDialogIndirectParam([in] HINSTANCE hInst, const void FAR*, [in] HWND hwnd, DLGPROC, LPARAM);
  1401.  
  1402.     int     WINAPI DialogBox([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC);
  1403.     int     WINAPI DialogBoxIndirect([in] HINSTANCE hInst, HGLOBAL, [in] HWND hwnd, DLGPROC);
  1404.     int     WINAPI DialogBoxParam([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC, LPARAM);
  1405.     int     WINAPI DialogBoxIndirectParam([in] HINSTANCE hInst, HGLOBAL, [in] HWND hwnd, DLGPROC, LPARAM);
  1406.  
  1407.     void    WINAPI EndDialog([in] HWND hwnd, int);
  1408.  
  1409.     int     WINAPI GetDlgCtrlID(HWND);
  1410.     HWND    WINAPI GetDlgItem(HWND, int);
  1411.     LRESULT WINAPI SendDlgItemMessage([in] HWND hwnd, int, UINT, WPARAM, LPARAM);
  1412.  
  1413.     void    WINAPI SetDlgItemInt([in] HWND hwnd, int, UINT, BOOL);
  1414.     UINT    WINAPI GetDlgItemInt([in] HWND hwnd, int, BOOL FAR* , BOOL);
  1415.  
  1416.     void    WINAPI SetDlgItemText([in] HWND hwnd, int, LPCSTR);
  1417.     int     WINAPI GetDlgItemText([in] HWND hwnd, int, LPSTR, int);
  1418.  
  1419.     void    WINAPI CheckDlgButton([in] HWND hwnd, int, UINT);
  1420.     void    WINAPI CheckRadioButton([in] HWND hwnd, int, int, int);
  1421.     UINT    WINAPI IsDlgButtonChecked([in] HWND hwnd, int);
  1422.  
  1423.     HWND    WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL);
  1424.     HWND    WINAPI GetNextDlgTabItem(HWND, HWND, BOOL);
  1425.  
  1426.     void    WINAPI MapDialogRect(HWND, RECT FAR*);
  1427.     DWORD   WINAPI GetDialogBaseUnits(void);
  1428.  
  1429.  
  1430.     */
  1431.  
  1432.     // ****** Dialog directory support ******
  1433.  
  1434.     /*
  1435.     int     WINAPI DlgDirList(HWND, LPSTR, int, int, UINT);
  1436.     BOOL    WINAPI DlgDirSelect(HWND, LPSTR, int);
  1437.  
  1438.     int     WINAPI DlgDirListComboBox(HWND, LPSTR, int, int, UINT);
  1439.     BOOL    WINAPI DlgDirSelectComboBox(HWND, LPSTR, int);
  1440.  
  1441.     BOOL    WINAPI DlgDirSelectEx(HWND, LPSTR, int, int);
  1442.     BOOL    WINAPI DlgDirSelectComboBoxEx(HWND, LPSTR, int, int);
  1443.     */
  1444.  
  1445.     // ******* Omit Windows hook support ******
  1446.  
  1447.     /*
  1448.     DECLARE_HANDLE32(HHOOK);
  1449.  
  1450.     typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  1451.  
  1452.     HHOOK   WINAPI SetWindowsHook(int, HOOKPROC);
  1453.     LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK FAR*);
  1454.     BOOL    WINAPI UnhookWindowsHook(int, HOOKPROC);
  1455.  
  1456.     HHOOK   WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, [in] HINSTANCE hInst hInstance, HTASK hTask);
  1457.     BOOL    WINAPI UnhookWindowsHookEx(HHOOK hHook);
  1458.     LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam);
  1459.     */
  1460.  
  1461.     // ****** Omit Computer-based-training (CBT) support *********
  1462.  
  1463.     /*
  1464.     // HCBT_CREATEWND parameters pointed to by lParam
  1465.     typedef struct tagCBT_CREATEWND
  1466.     {
  1467.         CREATESTRUCT FAR* lpcs;
  1468.         HWND    hwndInsertAfter;
  1469.     } CBT_CREATEWND;
  1470.     typedef CBT_CREATEWND FAR* LPCBT_CREATEWND;
  1471.  
  1472.     // HCBT_ACTIVATE structure pointed to by lParam
  1473.     typedef struct tagCBTACTIVATESTRUCT
  1474.     {
  1475.         BOOL    fMouse;
  1476.         HWND    hWndActive;
  1477.     } CBTACTIVATESTRUCT;
  1478.     */
  1479.  
  1480.     // ****** Omit Hardware hook support
  1481.  
  1482.     /*
  1483.     typedef struct tagHARDWAREHOOKSTRUCT
  1484.     {
  1485.         HWND    hWnd;
  1486.         UINT    wMessage;
  1487.         WPARAM  wParam;
  1488.         LPARAM  lParam;
  1489.     } HARDWAREHOOKSTRUCT;
  1490.     */
  1491.  
  1492.     // ****** Omit Shell support ********
  1493.  
  1494.     // ****** Omit Journalling support **
  1495.  
  1496.     /*
  1497.     // Journalling message structure
  1498.     typedef struct tagEVENTMSG
  1499.     {
  1500.         UINT    message;
  1501.         UINT    paramL;
  1502.         UINT    paramH;
  1503.         DWORD   time;
  1504.     } EVENTMSG;
  1505.     typedef EVENTMSG *PEVENTMSG;
  1506.     typedef EVENTMSG NEAR* NPEVENTMSG;
  1507.     typedef EVENTMSG FAR* LPEVENTMSG;
  1508.  
  1509.     BOOL    WINAPI EnableHardwareInput(BOOL);
  1510.     */
  1511.  
  1512.     // ****** Omit Debugger support *****
  1513.  
  1514.     /*
  1515.     typedef struct tagDEBUGHOOKINFO
  1516.     {
  1517.         HMODULE hModuleHook;
  1518.         LPARAM  reserved;
  1519.         LPARAM  lParam;
  1520.         WPARAM  wParam;
  1521.         int         code;
  1522.     } DEBUGHOOKINFO;
  1523.     typedef DEBUGHOOKINFO FAR* LPDEBUGHOOKINFO;
  1524.  
  1525.     BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg);
  1526.  
  1527.     BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock);
  1528.  
  1529.     LONG WINAPI GetSystemDebugState(void);
  1530.     */
  1531.  
  1532.     // ***** Process support ******
  1533.     #ifdef WIN32
  1534.     const DWORD IGNORE           = 0;
  1535.     const DWORD INFINITE         = 0xFFFFFFFF;
  1536.  
  1537.     const DWORD PROCESS_TERMINATE        = 0x0001;
  1538.     const DWORD PROCESS_CREATE_THREAD    = 0x0002;
  1539.     const DWORD PROCESS_VM_OPERATION     = 0x0008;
  1540.     const DWORD PROCESS_VM_READ          = 0x0010;
  1541.     const DWORD PROCESS_VM_WRITE         = 0x0020;
  1542.     const DWORD PROCESS_DUP_HANDLE       = 0x0040;
  1543.     const DWORD PROCESS_CREATE_PROCESS   = 0x0080;
  1544.     const DWORD PROCESS_SET_QUOTA        = 0x0100;
  1545.     const DWORD PROCESS_SET_INFORMATION  = 0x0200;
  1546.     const DWORD PROCESS_QUERY_INFORMATION = 0x0400;
  1547.     const DWORD PROCESS_ALL_ACCESS       = 0x001F0FFF;
  1548.     #endif
  1549.  
  1550.     // ****** Help support *********
  1551.  
  1552.     /*
  1553.     BOOL WINAPI WinHelp([in] HWND hwnd hwndMain, LPCSTR lpszHelp, UINT usCommand, DWORD ulData);
  1554.  
  1555.     typedef struct tagMULTIKEYHELP
  1556.     {
  1557.         UINT    mkSize;
  1558.         BYTE    mkKeylist;
  1559.         BYTE    szKeyphrase[1];
  1560.     } MULTIKEYHELP;
  1561.  
  1562.  
  1563.     typedef struct
  1564.     {
  1565.         int  wStructSize;
  1566.         int  x;
  1567.         int  y;
  1568.         int  dx;
  1569.         int  dy;
  1570.         int  wMax;
  1571.         char rgchMember[2];
  1572.     } HELPWININFO;
  1573.     typedef HELPWININFO NEAR* PHELPWININFO;
  1574.     typedef HELPWININFO FAR* LPHELPWININFO;
  1575.     */
  1576.  
  1577.     // ****** Omit Sound support (obsolete) *******
  1578.  
  1579.     /*
  1580.     int     WINAPI OpenSound(void);
  1581.     void    WINAPI CloseSound(void);
  1582.  
  1583.     int     WINAPI StartSound(void);
  1584.     int     WINAPI StopSound(void);
  1585.  
  1586.     int     WINAPI SetVoiceQueueSize(int, int);
  1587.     int     WINAPI SetVoiceNote(int, int, int, int);
  1588.     int     WINAPI SetVoiceAccent(int, int, int, int, int);
  1589.     int     WINAPI SetVoiceEnvelope(int, int, int);
  1590.     int     WINAPI SetVoiceSound(int, DWORD, int);
  1591.  
  1592.     int     WINAPI SetVoiceThreshold(int, int);
  1593.     int FAR* WINAPI GetThresholdEvent(void);
  1594.     int     WINAPI GetThresholdStatus(void);
  1595.  
  1596.     int     WINAPI SetSoundNoise(int, int);
  1597.  
  1598.  
  1599.     int     WINAPI WaitSoundState(int);
  1600.  
  1601.     // WaitSoundState() constants
  1602.     //define S_QUEUEEMPTY       0
  1603.     //define S_THRESHOLD        1
  1604.     //define S_ALLTHRESHOLD     2
  1605.  
  1606.     int     WINAPI SyncAllVoices(void);
  1607.     int     WINAPI CountVoiceNotes(int);
  1608.  
  1609.     // Accent Modes
  1610.     //define S_NORMAL      0
  1611.     //define S_LEGATO      1
  1612.     //define S_STACCATO    2
  1613.  
  1614.     // SetSoundNoise() Sources
  1615.     //define S_PERIOD512   0    // Freq = N/512 high pitch, less coarse hiss
  1616.     //define S_PERIOD1024  1    // Freq = N/1024
  1617.     //define S_PERIOD2048  2    // Freq = N/2048 low pitch, more coarse hiss
  1618.     //define S_PERIODVOICE 3    // Source is frequency from voice channel (3)
  1619.     //define S_WHITE512   4     // Freq = N/512 high pitch, less coarse hiss
  1620.     //define S_WHITE1024   5    // Freq = N/1024
  1621.     //define S_WHITE2048   6    // Freq = N/2048 low pitch, more coarse hiss
  1622.     //define S_WHITEVOICE  7    // Source is frequency from voice channel (3)
  1623.  
  1624.     // Error return values
  1625.     //define S_SERDVNA    (-1)  // Device not available
  1626.     //define S_SEROFM     (-2)  // Out of memory
  1627.     //define S_SERMACT    (-3)  // Music active
  1628.     //define S_SERQFUL    (-4)  // Queue full
  1629.     //define S_SERBDNT    (-5)  // Invalid note
  1630.     //define S_SERDLN     (-6)  // Invalid note length
  1631.     //define S_SERDCC     (-7)  // Invalid note count
  1632.     //define S_SERDTP     (-8)  // Invalid tempo
  1633.     //define S_SERDVL     (-9)  // Invalid volume
  1634.     //define S_SERDMD     (-10) // Invalid mode
  1635.     //define S_SERDSH     (-11) // Invalid shape
  1636.     //define S_SERDPT     (-12) // Invalid pitch
  1637.     //define S_SERDFQ     (-13) // Invalid frequency
  1638.     //define S_SERDDR     (-14) // Invalid duration
  1639.     //define S_SERDSR     (-15) // Invalid source
  1640.     //define S_SERDST     (-16) // Invalid state
  1641.     */
  1642.  
  1643.     // ****** Comm support *******
  1644.  
  1645.     /*
  1646.     //define NOPARITY       0
  1647.     //define ODDPARITY      1
  1648.     //define EVENPARITY     2
  1649.     //define MARKPARITY     3
  1650.     //define SPACEPARITY        4
  1651.  
  1652.     //define ONESTOPBIT     0
  1653.     //define ONE5STOPBITS       1
  1654.     //define TWOSTOPBITS        2
  1655.  
  1656.     // Error Flags
  1657.     //define CE_RXOVER          0x0001  // Receive Queue overflow
  1658.     //define CE_OVERRUN         0x0002  // Receive Overrun Error
  1659.     //define CE_RXPARITY        0x0004  // Receive Parity Error
  1660.     //define CE_FRAME           0x0008  // Receive Framing error
  1661.     //define CE_BREAK           0x0010  // Break Detected
  1662.     //define CE_TXFULL          0x0100  // TX Queue is full
  1663.     //define CE_PTO             0x0200  // LPTx Timeout
  1664.     //define CE_IOE             0x0400  // LPTx I/O Error
  1665.     //define CE_DNS             0x0800  // LPTx Device not selected
  1666.     //define CE_OOP             0x1000  // LPTx Out-Of-Paper
  1667.     //define CE_MODE            0x8000  // Requested mode unsupported
  1668.  
  1669.     //define IE_BADID           (-1)    // Invalid or unsupported id
  1670.     //define IE_OPEN            (-2)    // Device Already Open
  1671.     //define IE_NOPEN           (-3)    // Device Not Open
  1672.     //define IE_MEMORY          (-4)    // Unable to allocate queues
  1673.     //define IE_DEFAULT         (-5)    // Error in default parameters
  1674.     //define IE_HARDWARE        (-10)   // Hardware Not Present
  1675.     //define IE_BYTESIZE        (-11)   // Illegal Byte Size
  1676.     //define IE_BAUDRATE        (-12)   // Unsupported BaudRate
  1677.  
  1678.     // Events
  1679.     //define EV_RXCHAR          0x0001  // Any Character received
  1680.     //define EV_RXFLAG          0x0002  // Received certain character
  1681.     //define EV_TXEMPTY         0x0004  // Transmitt Queue Empty
  1682.     //define EV_CTS             0x0008  // CTS changed state
  1683.     //define EV_DSR             0x0010  // DSR changed state
  1684.     //define EV_RLSD            0x0020  // RLSD changed state
  1685.     //define EV_BREAK           0x0040  // BREAK received
  1686.     //define EV_ERR             0x0080  // Line status error occurred
  1687.     //define EV_RING            0x0100  // Ring signal detected
  1688.     //define EV_PERR            0x0200  // Printer error occured
  1689.     //define EV_RX80FULL        0x0400  // Receive buffer is 80 percent full
  1690.     //define EV_EVENT1          0x0800  // Provider specific event 1
  1691.     //define EV_EVENT2          0x1000  // Provider specific event 2
  1692.  
  1693.     //define EV_CTSS             0x0400
  1694.     //define EV_DSRS             0x0800
  1695.     //define EV_RLSDS            0x1000
  1696.     //define EV_RingTe           0x2000
  1697.     //define EV_RINGTE      EV_RingTe
  1698.  
  1699.     // Escape Functions
  1700.     //define SETXOFF            1       // Simulate XOFF received
  1701.     //define SETXON             2       // Simulate XON received
  1702.     //define SETRTS             3       // Set RTS high
  1703.     //define CLRRTS             4       // Set RTS low
  1704.     //define SETDTR             5       // Set DTR high
  1705.     //define CLRDTR             6       // Set DTR low
  1706.     //define RESETDEV           7       // Reset device if possible
  1707.     //define SETBREAK           8       // Set the device break line.
  1708.     //define CLRBREAK           9       // Clear the device break line.
  1709.  
  1710.     //define LPTx               0x80    // Set if ID is for LPT device
  1711.  
  1712.  
  1713.     // new escape functions
  1714.     //define GETMAXLPT           8
  1715.     //define GETMAXCOM           9
  1716.     //define GETBASEIRQ          10
  1717.  
  1718.     // Comm Baud Rate indices
  1719.     //define CBR_110         0xFF10
  1720.     //define CBR_300      0xFF11
  1721.     //define CBR_600      0xFF12
  1722.     //define CBR_1200     0xFF13
  1723.     //define CBR_2400     0xFF14
  1724.     //define CBR_4800     0xFF15
  1725.     //define CBR_9600     0xFF16
  1726.     //define CBR_14400    0xFF17
  1727.     //define CBR_19200    0xFF18
  1728.     //define CBR_38400    0xFF1B
  1729.     //define CBR_56000    0xFF1F
  1730.     //define CBR_128000   0xFF23
  1731.     //define CBR_256000   0xFF27
  1732.  
  1733.     // notifications passed in low word of lParam on WM_COMMNOTIFY messages
  1734.     //define CN_RECEIVE  0x0001
  1735.     //define CN_TRANSMIT 0x0002
  1736.     //define CN_EVENT    0x0004
  1737.  
  1738.     //
  1739.     // PURGE function flags.
  1740.     //
  1741.     //define PURGE_TXABORT      0x0001  // Kill the pending/current writes to the comm port.
  1742.     //define PURGE_RXABORT      0x0002  // Kill the pending/current reads to the comm port.
  1743.     //define PURGE_TXCLEAR      0x0004  // Kill the transmit queue if there.
  1744.     //define PURGE_RXCLEAR      0x0008  // Kill the typeahead buffer if there.
  1745.  
  1746.     //
  1747.     // Modem Status Flags
  1748.     //
  1749.     //define MS_CTS_ON          ((DWORD)0x0010)
  1750.     //define MS_DSR_ON          ((DWORD)0x0020)
  1751.     //define MS_RING_ON         ((DWORD)0x0040)
  1752.     //define MS_RLSD_ON         ((DWORD)0x0080)
  1753.  
  1754.     //
  1755.     // Serial provider type.
  1756.     //
  1757.  
  1758.     //define SP_SERIALCOMM   ((DWORD)0x00000001)
  1759.  
  1760.     //
  1761.     // Provider SubTypes
  1762.     //
  1763.  
  1764.     //define PST_UNSPECIFIED     ((DWORD)0x00000000)
  1765.     //define PST_RS232           ((DWORD)0x00000001)
  1766.     //define PST_PARALLELPORT    ((DWORD)0x00000002)
  1767.     //define PST_RS422           ((DWORD)0x00000003)
  1768.     //define PST_RS423           ((DWORD)0x00000004)
  1769.     //define PST_RS449           ((DWORD)0x00000005)
  1770.     //define PST_FAX             ((DWORD)0x00000021)
  1771.     //define PST_SCANNER         ((DWORD)0x00000022)
  1772.     //define PST_NETWORK_BRIDGE  ((DWORD)0x00000100)
  1773.     //define PST_LAT             ((DWORD)0x00000101)
  1774.     //define PST_TCPIP_TELNET    ((DWORD)0x00000102)
  1775.     //define PST_X25             ((DWORD)0x00000103)
  1776.  
  1777.  
  1778.     //
  1779.     // Provider capabilities flags.
  1780.     //
  1781.  
  1782.     //define PCF_DTRDSR       ((DWORD)0x0001)
  1783.     //define PCF_RTSCTS       ((DWORD)0x0002)
  1784.     //define PCF_RLSD         ((DWORD)0x0004)
  1785.     //define PCF_PARITY_CHECK  ((DWORD)0x0008)
  1786.     //define PCF_XONXOFF      ((DWORD)0x0010)
  1787.     //define PCF_SETXCHAR     ((DWORD)0x0020)
  1788.     //define PCF_TOTALTIMEOUTS ((DWORD)0x0040)
  1789.     //define PCF_INTTIMEOUTS   ((DWORD)0x0080)
  1790.     //define PCF_SPECIALCHARS  ((DWORD)0x0100)
  1791.     //define PCF_16BITMODE    ((DWORD)0x0200)
  1792.  
  1793.     //
  1794.     // Comm provider settable parameters.
  1795.     //
  1796.  
  1797.     //define SP_PARITY        ((DWORD)0x0001)
  1798.     //define SP_BAUD          ((DWORD)0x0002)
  1799.     //define SP_DATABITS      ((DWORD)0x0004)
  1800.     //define SP_STOPBITS      ((DWORD)0x0008)
  1801.     //define SP_HANDSHAKING   ((DWORD)0x0010)
  1802.     //define SP_PARITY_CHECK   ((DWORD)0x0020)
  1803.     //define SP_RLSD          ((DWORD)0x0040)
  1804.  
  1805.     //
  1806.     // Settable baud rates in the provider.
  1807.     //
  1808.  
  1809.     //define BAUD_075         ((DWORD)0x00000001)
  1810.     //define BAUD_110         ((DWORD)0x00000002)
  1811.     //define BAUD_134_5       ((DWORD)0x00000004)
  1812.     //define BAUD_150         ((DWORD)0x00000008)
  1813.     //define BAUD_300         ((DWORD)0x00000010)
  1814.     //define BAUD_600         ((DWORD)0x00000020)
  1815.     //define BAUD_1200        ((DWORD)0x00000040)
  1816.     //define BAUD_1800        ((DWORD)0x00000080)
  1817.     //define BAUD_2400        ((DWORD)0x00000100)
  1818.     //define BAUD_4800        ((DWORD)0x00000200)
  1819.     //define BAUD_7200        ((DWORD)0x00000400)
  1820.     //define BAUD_9600        ((DWORD)0x00000800)
  1821.     //define BAUD_14400       ((DWORD)0x00001000)
  1822.     //define BAUD_19200       ((DWORD)0x00002000)
  1823.     //define BAUD_38400       ((DWORD)0x00004000)
  1824.     //define BAUD_56K         ((DWORD)0x00008000)
  1825.     //define BAUD_128K        ((DWORD)0x00010000)
  1826.     //define BAUD_115200      ((DWORD)0x00020000)
  1827.     //define BAUD_57600       ((DWORD)0x00040000)
  1828.     //define BAUD_USER        ((DWORD)0x10000000)
  1829.  
  1830.     //
  1831.     // Settable Data Bits
  1832.     //
  1833.  
  1834.     //define DATABITS_5       ((WORD)0x0001)
  1835.     //define DATABITS_6       ((WORD)0x0002)
  1836.     //define DATABITS_7       ((WORD)0x0004)
  1837.     //define DATABITS_8       ((WORD)0x0008)
  1838.     //define DATABITS_16      ((WORD)0x0010)
  1839.     //define DATABITS_16X     ((WORD)0x0020)
  1840.  
  1841.     //
  1842.     // Settable Stop and Parity bits.
  1843.     //
  1844.  
  1845.     //define STOPBITS_10      ((WORD)0x0001)
  1846.     //define STOPBITS_15      ((WORD)0x0002)
  1847.     //define STOPBITS_20      ((WORD)0x0004)
  1848.     //define PARITY_NONE      ((WORD)0x0100)
  1849.     //define PARITY_ODD       ((WORD)0x0200)
  1850.     //define PARITY_EVEN      ((WORD)0x0400)
  1851.     //define PARITY_MARK      ((WORD)0x0800)
  1852.     //define PARITY_SPACE     ((WORD)0x1000)
  1853.  
  1854.     typedef struct _DCB {
  1855.         DWORD DCBlength;      // sizeof(DCB)
  1856.         DWORD BaudRate;       // Baudrate at which running
  1857.         DWORD fBinary: 1;     // Binary Mode (skip EOF check)
  1858.         DWORD fParity: 1;     // Enable parity checking
  1859.         DWORD fOutxCtsFlow:1; // CTS handshaking on output
  1860.         DWORD fOutxDsrFlow:1; // DSR handshaking on output
  1861.         DWORD fDtrControl:2;  // DTR Flow control
  1862.         DWORD fDsrSensitivity:1; // DSR Sensitivity
  1863.         DWORD fTXContinueOnXoff: 1; // Continue TX when Xoff sent
  1864.         DWORD fOutX: 1;       // Enable output X-ON/X-OFF
  1865.         DWORD fInX: 1;        // Enable input X-ON/X-OFF
  1866.         DWORD fErrorChar: 1;  // Enable Err Replacement
  1867.         DWORD fNull: 1;       // Enable Null stripping
  1868.         DWORD fRtsControl:2;  // Rts Flow control
  1869.         DWORD fAbortOnError:1; // Abort all reads and writes on Error
  1870.         DWORD fDummy2:17;     // Reserved
  1871.         WORD wReserved;       // Not currently used
  1872.         WORD XonLim;          // Transmit X-ON threshold
  1873.         WORD XoffLim;         // Transmit X-OFF threshold
  1874.         BYTE ByteSize;        // Number of bits/byte, 4-8
  1875.         BYTE Parity;          // 0-4=None,Odd,Even,Mark,Space
  1876.         BYTE StopBits;        // 0,1,2 = 1, 1.5, 2
  1877.         char XonChar;         // Tx and Rx X-ON character
  1878.         char XoffChar;        // Tx and Rx X-OFF character
  1879.         char ErrorChar;       // Error replacement char
  1880.         char EofChar;         // End of Input character
  1881.         char EvtChar;         // Received Event character
  1882.         WORD wReserved1;      // Fill for now.
  1883.     } DCB, *LPDCB;
  1884.  
  1885.     typedef struct tagCOMSTAT
  1886.     {
  1887.         BYTE status;
  1888.         UINT cbInQue;
  1889.         UINT cbOutQue;
  1890.     } COMSTAT;
  1891.  
  1892.     typedef struct _COMMTIMEOUTS {
  1893.         DWORD ReadIntervalTimeout;          // Maximum time between read chars.
  1894.         DWORD ReadTotalTimeoutMultiplier;   // Multiplier of characters.
  1895.         DWORD ReadTotalTimeoutConstant;     // Constant in milliseconds.
  1896.         DWORD WriteTotalTimeoutMultiplier;  // Multiplier of characters.
  1897.         DWORD WriteTotalTimeoutConstant;    // Constant in milliseconds.
  1898.     } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
  1899.  
  1900.     typedef struct _COMMCONFIG {
  1901.         DWORD dwSize;
  1902.         WORD wVersion;
  1903.         WORD wReserved;
  1904.         DCB dcb;
  1905.         DWORD dwProviderSubType;
  1906.         DWORD dwProviderOffset;
  1907.         DWORD dwProviderSize;
  1908.         WCHAR wcProviderData[1];
  1909.     } COMMCONFIG,*LPCOMMCONFIG;
  1910.  
  1911.     //define CSTF_CTSHOLD    0x01
  1912.     //define CSTF_DSRHOLD    0x02
  1913.     //define CSTF_RLSDHOLD   0x04
  1914.     //define CSTF_XOFFHOLD   0x08
  1915.     //define CSTF_XOFFSENT   0x10
  1916.     //define CSTF_EOF        0x20
  1917.     //define CSTF_TXIM       0x40
  1918.  
  1919.     // NOTE: This structure declaration is not ANSI compatible!
  1920.     typedef struct tagCOMSTAT
  1921.     {
  1922.         BYTE fCtsHold  :1;
  1923.         BYTE fDsrHold  :1;
  1924.         BYTE fRlsdHold :1;
  1925.         BYTE fXoffHold :1;
  1926.         BYTE fXoffSent :1;
  1927.         BYTE fEof      :1;
  1928.         BYTE fTxim     :1;
  1929.         UINT cbInQue;
  1930.         UINT cbOutQue;
  1931.     } COMSTAT;
  1932.  
  1933.     typedef struct _COMMPROP {
  1934.         WORD wPacketLength;
  1935.         WORD wPacketVersion;
  1936.         DWORD dwServiceMask;
  1937.         DWORD dwReserved1;
  1938.         DWORD dwMaxTxQueue;
  1939.         DWORD dwMaxRxQueue;
  1940.         DWORD dwMaxBaud;
  1941.         DWORD dwProvSubType;
  1942.         DWORD dwProvCapabilities;
  1943.         DWORD dwSettableParams;
  1944.         DWORD dwSettableBaud;
  1945.         WORD wSettableData;
  1946.         WORD wSettableStopParity;
  1947.         DWORD dwCurrentTxQueue;
  1948.         DWORD dwCurrentRxQueue;
  1949.         DWORD dwProvSpec1;
  1950.         DWORD dwProvSpec2;
  1951.         WCHAR wcProvChar[1];
  1952.     } COMMPROP,*LPCOMMPROP;
  1953.  
  1954.     //
  1955.     // DTR Control Flow Values.
  1956.     //
  1957.     //define DTR_CONTROL_DISABLE    0x00
  1958.     //define DTR_CONTROL_ENABLE    0x01
  1959.     //define DTR_CONTROL_HANDSHAKE  0x02
  1960.  
  1961.     //
  1962.     // RTS Control Flow Values
  1963.     //
  1964.     //define RTS_CONTROL_DISABLE    0x00
  1965.     //define RTS_CONTROL_ENABLE    0x01
  1966.     //define RTS_CONTROL_HANDSHAKE  0x02
  1967.     //define RTS_CONTROL_TOGGLE    0x03
  1968.     */
  1969.  
  1970.     /*
  1971.     BOOL WINAPI ClearCommError(
  1972.         HANDLE hFile,
  1973.         LPDWORD lpErrors,
  1974.         LPCOMSTAT lpStat
  1975.         );
  1976.  
  1977.     BOOL WINAPI SetupComm(
  1978.         HANDLE hFile,
  1979.         DWORD dwInQueue,
  1980.         DWORD dwOutQueue
  1981.         );
  1982.  
  1983.     BOOL WINAPI GetCommConfig(
  1984.         HANDLE hCommDev,
  1985.         LPCOMMCONFIG lpCC,
  1986.         LPDWORD lpdwSize
  1987.         );
  1988.  
  1989.     BOOL WINAPI GetCommMask(
  1990.         HANDLE hFile,
  1991.         LPDWORD lpEvtMask
  1992.         );
  1993.  
  1994.     BOOL WINAPI GetCommProperties(
  1995.         HANDLE hFile,
  1996.         LPCOMMPROP lpCommProp
  1997.         );
  1998.  
  1999.     BOOL WINAPI GetCommModemStatus(
  2000.         HANDLE hFile,
  2001.         LPDWORD lpModemStat
  2002.         );
  2003.  
  2004.     BOOL WINAPI GetCommTimeouts(
  2005.         HANDLE hFile,
  2006.         LPCOMMTIMEOUTS lpCommTimeouts
  2007.         );
  2008.  
  2009.     BOOL WINAPI PurgeComm(
  2010.         HANDLE hFile,
  2011.         DWORD dwFlags
  2012.         );
  2013.  
  2014.     BOOL WINAPI SetCommConfig(
  2015.         HANDLE hCommDev,
  2016.         LPCOMMCONFIG lpCC,
  2017.         DWORD dwSize
  2018.         );
  2019.  
  2020.     BOOL WINAPI SetCommMask(
  2021.         HANDLE hFile,
  2022.         DWORD dwEvtMask
  2023.         );
  2024.  
  2025.     BOOL WINAPI SetCommTimeouts(
  2026.         HANDLE hFile,
  2027.         LPCOMMTIMEOUTS lpCommTimeouts
  2028.         );
  2029.  
  2030.     BOOL WINAPI WaitCommEvent(
  2031.         HANDLE hFile,
  2032.         LPDWORD lpEvtMask,
  2033.         LPOVERLAPPED lpOverlapped
  2034.         );
  2035.  
  2036.     BOOL WINAPI BuildCommDCBA(
  2037.         LPCSTR lpDef,
  2038.         LPDCB lpDCB
  2039.         );
  2040.  
  2041.     BOOL WINAPI BuildCommDCBAndTimeoutsA(
  2042.         LPCSTR lpDef,
  2043.         LPDCB lpDCB,
  2044.         LPCOMMTIMEOUTS lpCommTimeouts
  2045.         );
  2046.  
  2047.     BOOL WINAPI CommConfigDialogA(
  2048.         LPCSTR lpszName,
  2049.         HWND hWnd,
  2050.         LPCOMMCONFIG lpCC
  2051.         );
  2052.  
  2053.     BOOL WINAPI GetDefaultCommConfigA(
  2054.         LPCSTR lpszName,
  2055.         LPCOMMCONFIG lpCC,
  2056.         LPDWORD lpdwSize
  2057.         );
  2058.  
  2059.     BOOL WINAPI SetDefaultCommConfigA(
  2060.         LPCSTR lpszName,
  2061.         LPCOMMCONFIG lpCC,
  2062.         DWORD dwSize
  2063.         );
  2064.  
  2065.     int     WINAPI OpenComm(LPCSTR, UINT, UINT);
  2066.     int     WINAPI CloseComm(int);
  2067.  
  2068.     int     WINAPI ReadComm(int, void FAR*, int);
  2069.     int     WINAPI WriteComm(int, const void FAR*, int);
  2070.     int     WINAPI UngetCommChar(int, char);
  2071.     int     WINAPI FlushComm(int, int);
  2072.     int     WINAPI TransmitCommChar(int, char);
  2073.  
  2074.     int     WINAPI SetCommState(const DCB FAR*);
  2075.     int     WINAPI GetCommState(int, DCB FAR*);
  2076.     int     WINAPI GetCommError(int, COMSTAT FAR* );
  2077.  
  2078.     int     WINAPI SetCommBreak(int);
  2079.     int     WINAPI ClearCommBreak(int);
  2080.  
  2081.     UINT FAR* WINAPI SetCommEventMask(int, UINT);
  2082.     UINT    WINAPI GetCommEventMask(int, int);
  2083.  
  2084.     LONG    WINAPI EscapeCommFunction(int, int);
  2085.  
  2086.     BOOL    WINAPI EnableCommNotification(int, [in] HWND hwnd, int, int);
  2087.     */
  2088.  
  2089.     // ****** Omit String formatting support *********
  2090.  
  2091.     /*
  2092.     int     WINAPI wvsprintf(LPSTR lpszOut, LPCSTR lpszFmt, const void FAR* lpParams);
  2093.  
  2094.     int FAR CDECL wsprintf(LPSTR lpszOut, LPCSTR lpszFmt, ...);
  2095.     */
  2096.  
  2097.     // ****** Driver support *******
  2098.  
  2099.     /*
  2100.     DECLARE_HANDLE(HDRVR);
  2101.  
  2102.     typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
  2103.  
  2104.     // Driver messages
  2105.     //define DRV_LOAD       0x0001
  2106.     //define DRV_ENABLE     0x0002
  2107.     //define DRV_OPEN       0x0003
  2108.     //define DRV_CLOSE      0x0004
  2109.     //define DRV_DISABLE        0x0005
  2110.     //define DRV_FREE       0x0006
  2111.     //define DRV_CONFIGURE      0x0007
  2112.     //define DRV_QUERYCONFIGURE 0x0008
  2113.     //define DRV_INSTALL        0x0009
  2114.     //define DRV_REMOVE     0x000A
  2115.     //define DRV_EXITSESSION         0x000B
  2116.     //define DRV_EXITAPPLICATION     0x000C
  2117.     //define DRV_POWER      0x000F
  2118.  
  2119.     //define DRV_RESERVED       0x0800
  2120.     //define DRV_USER       0x4000
  2121.  
  2122.     // LPARAM of DRV_CONFIGURE message
  2123.     typedef struct tagDRVCONFIGINFO
  2124.     {
  2125.         DWORD   dwDCISize;
  2126.         LPCSTR  lpszDCISectionName;
  2127.         LPCSTR  lpszDCIAliasName;
  2128.     } DRVCONFIGINFO;
  2129.     typedef DRVCONFIGINFO NEAR* PDRVCONFIGINFO;
  2130.     typedef DRVCONFIGINFO FAR* LPDRVCONFIGINFO;
  2131.  
  2132.     // Supported return values for DRV_CONFIGURE message
  2133.     //define DRVCNF_CANCEL      0x0000
  2134.     //define DRVCNF_OK      0x0001
  2135.     //define DRVCNF_RESTART     0x0002
  2136.  
  2137.     // Supported lParam1 of DRV_EXITAPPLICATION notification
  2138.     //define DRVEA_NORMALEXIT            0x0001
  2139.     //define DRVEA_ABNORMALEXIT          0x0002
  2140.  
  2141.     LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2);
  2142.  
  2143.     HDRVR   WINAPI OpenDriver(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2);
  2144.     LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2);
  2145.  
  2146.     HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver);
  2147.  
  2148.     HDRVR   WINAPI GetNextDriver(HDRVR, DWORD);
  2149.  
  2150.     // GetNextDriver flags
  2151.     //define GND_FIRSTINSTANCEONLY  0x00000001
  2152.  
  2153.     //define GND_FORWARD             0x00000000
  2154.     //define GND_REVERSE        0x00000002
  2155.  
  2156.     typedef struct tagDRIVERINFOSTRUCT
  2157.     {
  2158.         UINT    length;
  2159.         HDRVR   hDriver;
  2160.         HINSTANCE hModule;
  2161.         char    szAliasName[128];
  2162.     } DRIVERINFOSTRUCT;
  2163.     typedef DRIVERINFOSTRUCT FAR* LPDRIVERINFOSTRUCT;
  2164.  
  2165.     BOOL    WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*);
  2166.     */
  2167.  
  2168.     #ifdef WIN32
  2169.  
  2170.     [
  2171.     usesgetlasterror,
  2172.     entry("DrawEdge"),
  2173.     helpstring("Draws a 3-D edge on a rectangle according to the given edge and border flags"),
  2174.     ]
  2175.     BOOL WINAPI DrawEdge([in] HDC hdc, [in] long * lprc,
  2176.                          [in] UINT edge, [in] UINT grfFlags);
  2177.  
  2178.     [
  2179.     usesgetlasterror,
  2180.     entry("DrawFrameControl"),
  2181.     helpstring("Draws a control frame of a specified type and style"),
  2182.     ]
  2183.     BOOL WINAPI DrawFrameControl([in] HDC hdc, [in] long * lprc,
  2184.                                  [in] UINT uType, [in] UINT uState);
  2185.  
  2186.     [
  2187.     usesgetlasterror,
  2188.     entry("DrawAnimatedRects"),
  2189.     helpstring("Draws a wire-frame rectangle and animates it to indicate opening an icon or minimizing or maximizing a window"),
  2190.     ]
  2191.     BOOL WINAPI DrawAnimatedRects([in] HWND hwnd, [in] int idAni,
  2192.                                   [in] long * lprcFrom,
  2193.                                   [in] long * lprcTo);
  2194.  
  2195.     /*
  2196.     [
  2197.     usesgetlasterror,
  2198.     entry("DrawCaption"),
  2199.     helpstring("Draws a window caption"),
  2200.     ]
  2201.     BOOL WINAPI DrawCaption([in] HWND, [in] HDC, [in] CONST RECT *, [in] UINT);
  2202.     */
  2203.  
  2204.     #endif // WIN32
  2205.  
  2206.     // ****** Color support *******
  2207.  
  2208.     [
  2209.     usesgetlasterror,
  2210.     entry("GetSysColor"),
  2211.     helpstring("Returns color of the specified display element"),
  2212.     ]
  2213.     COLORREF WINAPI GetSysColor([in] int nIndex);
  2214.  
  2215. //@B SetSysColor
  2216.     [
  2217.     usesgetlasterror,
  2218.     entry("SetSysColor"),
  2219.     helpstring("Sets colors of the display element in the lpaElements array to the colors in the lpaRgbValues array"),
  2220.     ]
  2221.     void    WINAPI SetSysColors([in] int cElements,
  2222.                                 [in] int FAR * lpaElements,
  2223.                                 [in] COLORREF FAR * lpaRgbValues);
  2224. //@E SetSysColor
  2225.  
  2226.     // ****** Exit Windows support *******
  2227.  
  2228.     [
  2229.     usesgetlasterror,
  2230.     entry("ExitWindows"),
  2231.     helpstring("Exit from Windows, restarting or rebooting"),
  2232.     ]
  2233.     BOOL    WINAPI ExitWindows([in] DWORD dwReturnCode, [in] UINT reserved);
  2234.  
  2235.  
  2236.     #ifdef WIN32
  2237.     [
  2238.     usesgetlasterror,
  2239.     entry("ExitWindowsEx"),
  2240.     helpstring("Exit from Windows, restarting or rebooting"),
  2241.     ]
  2242.     BOOL    WINAPI ExitWindowsEx([in] UINT uFlags, [in] DWORD dwReserved);
  2243.     #endif
  2244.  
  2245.     [
  2246.     #ifdef WIN32
  2247.     usesgetlasterror,
  2248.     entry("ExitWindowsExecA"),
  2249.     #else
  2250.     entry("ExitWindowsExec"),
  2251.     #endif
  2252.     helpstring("Exit from Windows, run a program, and restart"),
  2253.     ]
  2254.     BOOL    WINAPI ExitWindowsExec(
  2255.                         [in] LPCSTR lpszExe, [in] LPCSTR lpszParams);
  2256.  
  2257. }   // End module User
  2258.  
  2259.  
  2260. [
  2261. uuid(54674047-3A82-101B-8181-00AA003743D3),
  2262. helpstring("Windows User Constants"),
  2263. dllname("NOSUCH.DLL")
  2264. ]
  2265. module UserConst {
  2266.  
  2267.     // GetSystemMetrics() codes
  2268.     const int SM_CXSCREEN     = 0;
  2269.     const int SM_CYSCREEN     = 1;
  2270.     const int SM_CXVSCROLL        = 2;
  2271.     const int SM_CYHSCROLL        = 3;
  2272.     const int SM_CYCAPTION        = 4;
  2273.     const int SM_CXBORDER     = 5;
  2274.     const int SM_CYBORDER     = 6;
  2275.     const int SM_CXDLGFRAME   = 7;
  2276.     const int SM_CYDLGFRAME   = 8;
  2277.     const int SM_CYVTHUMB     = 9;
  2278.     const int SM_CXHTHUMB     = 10;
  2279.     const int SM_CXICON       = 11;
  2280.     const int SM_CYICON       = 12;
  2281.     const int SM_CXCURSOR     = 13;
  2282.     const int SM_CYCURSOR     = 14;
  2283.     const int SM_CYMENU           = 15;
  2284.     const int SM_CXFULLSCREEN = 16;
  2285.     const int SM_CYFULLSCREEN = 17;
  2286.     const int SM_CYKANJIWINDOW    = 18;
  2287.     const int SM_MOUSEPRESENT = 19;
  2288.     const int SM_CYVSCROLL        = 20;
  2289.     const int SM_CXHSCROLL        = 21;
  2290.     const int SM_DEBUG            = 22;
  2291.     const int SM_SWAPBUTTON   = 23;
  2292.     const int SM_RESERVED1        = 24;
  2293.     const int SM_RESERVED2        = 25;
  2294.     const int SM_RESERVED3        = 26;
  2295.     const int SM_RESERVED4        = 27;
  2296.     const int SM_CXMIN            = 28;
  2297.     const int SM_CYMIN            = 29;
  2298.     const int SM_CXSIZE           = 30;
  2299.     const int SM_CYSIZE           = 31;
  2300.     const int SM_CXFRAME      = 32;
  2301.     const int SM_CYFRAME      = 33;
  2302.     const int SM_CXMINTRACK   = 34;
  2303.     const int SM_CYMINTRACK   = 35;
  2304.  
  2305.     const int SM_CXDOUBLECLK  = 36;
  2306.     const int SM_CYDOUBLECLK  = 37;
  2307.     const int SM_CXICONSPACING    = 38;
  2308.     const int SM_CYICONSPACING    = 39;
  2309.     const int SM_MENUDROPALIGNMENT = 40;
  2310.     const int SM_PENWINDOWS       = 41;
  2311.     const int SM_DBCSENABLED  = 42;
  2312.  
  2313.     const int SM_CMETRICS     = 43;
  2314.  
  2315.     // GetSysColor/SetSysColors
  2316.     const int COLOR_SCROLLBAR             = 0;
  2317.     const int COLOR_BACKGROUND            = 1;
  2318.     const int COLOR_ACTIVECAPTION         = 2;
  2319.     const int COLOR_INACTIVECAPTION       = 3;
  2320.     const int COLOR_MENU                  = 4;
  2321.     const int COLOR_WINDOW                = 5;
  2322.     const int COLOR_WINDOWFRAME           = 6;
  2323.     const int COLOR_MENUTEXT              = 7;
  2324.     const int COLOR_WINDOWTEXT            = 8;
  2325.     const int COLOR_CAPTIONTEXT           = 9;
  2326.     const int COLOR_ACTIVEBORDER          = 10;
  2327.     const int COLOR_INACTIVEBORDER        = 11;
  2328.     const int COLOR_APPWORKSPACE          = 12;
  2329.     const int COLOR_HIGHLIGHT             = 13;
  2330.     const int COLOR_HIGHLIGHTTEXT         = 14;
  2331.     const int COLOR_BTNFACE               = 15;
  2332.     const int COLOR_BTNSHADOW             = 16;
  2333.     const int COLOR_GRAYTEXT              = 17;
  2334.     const int COLOR_BTNTEXT               = 18;
  2335.     const int COLOR_INACTIVECAPTIONTEXT   = 19;
  2336.     const int COLOR_BTNHIGHLIGHT          = 20;
  2337.  
  2338.     const int COLOR_3DDKSHADOW            = 21;
  2339.     const int COLOR_3DLIGHT               = 22;
  2340.     const int COLOR_INFOTEXT              = 23;
  2341.     const int COLOR_INFOBK                = 24;
  2342.  
  2343.     const int COLOR_DESKTOP               = 1;  // COLOR_BACKGROUND
  2344.     const int COLOR_3DFACE                = 15; // COLOR_BTNFACE
  2345.     const int COLOR_3DSHADOW              = 16; // COLOR_BTNSHADOW
  2346.     const int COLOR_3DHIGHLIGHT           = 20; // COLOR_BTNHIGHLIGHT
  2347.     const int COLOR_3DHILIGHT             = 20; // COLOR_BTNHIGHLIGHT
  2348.     const int COLOR_BTNHILIGHT            = 20; // COLOR_BTNHIGHLIGHT
  2349.  
  2350.     const int SPI_GETBEEP                 = 1;
  2351.     const int SPI_SETBEEP                 = 2;
  2352.     const int SPI_GETMOUSE                = 3;
  2353.     const int SPI_SETMOUSE                = 4;
  2354.     const int SPI_GETBORDER               = 5;
  2355.     const int SPI_SETBORDER               = 6;
  2356.     const int SPI_GETKEYBOARDSPEED        = 10;
  2357.     const int SPI_SETKEYBOARDSPEED        = 11;
  2358.     const int SPI_LANGDRIVER              = 12;
  2359.     const int SPI_ICONHORIZONTALSPACING   = 13;
  2360.     const int SPI_GETSCREENSAVETIMEOUT    = 14;
  2361.     const int SPI_SETSCREENSAVETIMEOUT    = 15;
  2362.     const int SPI_GETSCREENSAVEACTIVE     = 16;
  2363.     const int SPI_SETSCREENSAVEACTIVE     = 17;
  2364.     const int SPI_GETGRIDGRANULARITY      = 18;
  2365.     const int SPI_SETGRIDGRANULARITY      = 19;
  2366.     const int SPI_SETDESKWALLPAPER        = 20;
  2367.     const int SPI_SETDESKPATTERN          = 21;
  2368.     const int SPI_GETKEYBOARDDELAY        = 22;
  2369.     const int SPI_SETKEYBOARDDELAY        = 23;
  2370.     const int SPI_ICONVERTICALSPACING     = 24;
  2371.     const int SPI_GETICONTITLEWRAP        = 25;
  2372.     const int SPI_SETICONTITLEWRAP        = 26;
  2373.     const int SPI_GETMENUDROPALIGNMENT    = 27;
  2374.     const int SPI_SETMENUDROPALIGNMENT    = 28;
  2375.     const int SPI_SETDOUBLECLKWIDTH       = 29;
  2376.     const int SPI_SETDOUBLECLKHEIGHT      = 30;
  2377.     const int SPI_GETICONTITLELOGFONT     = 31;
  2378.     const int SPI_SETDOUBLECLICKTIME      = 32;
  2379.     const int SPI_SETMOUSEBUTTONSWAP      = 33;
  2380.     const int SPI_SETICONTITLELOGFONT     = 34;
  2381.     const int SPI_GETFASTTASKSWITCH       = 35;
  2382.     const int SPI_SETFASTTASKSWITCH       = 36;
  2383.  
  2384.     // SystemParametersInfo flags
  2385.     const int SPIF_UPDATEINIFILE       = 0x0001;
  2386.     const int SPIF_SENDWININICHANGE    = 0x0002;
  2387.  
  2388.     // Scroll bar selection constants
  2389.     const int SB_HORZ         = 0;
  2390.     const int SB_VERT         = 1;
  2391.     const int SB_CTL          = 2;
  2392.     const int SB_BOTH         = 3;
  2393.  
  2394.     // EnableScrollBar() flags
  2395.     const int ESB_ENABLE_BOTH      = 0x0000;
  2396.     const int ESB_DISABLE_BOTH     = 0x0003;
  2397.  
  2398.     const int ESB_DISABLE_LEFT     = 0x0001;
  2399.     const int ESB_DISABLE_RIGHT    = 0x0002;
  2400.  
  2401.     const int ESB_DISABLE_UP       = 0x0001;
  2402.     const int ESB_DISABLE_DOWN     = 0x0002;
  2403.  
  2404.     const int ESB_DISABLE_LTUP     = 0x0001;
  2405.     const int ESB_DISABLE_RTDN     = 0x0002;
  2406.  
  2407.     // Window field offsets for GetWindowLong() and GetWindowWord()
  2408.     [ helpstring("Window long: Window proc") ]
  2409.     const int GWL_WNDPROC       = -4;
  2410.     [ helpstring("Window long: Style") ]
  2411.     const int GWL_STYLE         = -16;
  2412.     [ helpstring("Window long: Extended style") ]
  2413.     const int GWL_EXSTYLE       = -20;
  2414.     [ helpstring("Window data: Instance handle") ]
  2415.     const int GWD_HINSTANCE     = -6;
  2416.     [ helpstring("Window data: Window parent") ]
  2417.     const int GWD_HWNDPARENT    = -8;
  2418.     [ helpstring("Window data: ID") ]
  2419.     const int GWD_ID            = -12;
  2420.     #ifdef WIN32
  2421.     [ helpstring("Window long: Instance handle") ]
  2422.     const int GWL_HINSTANCE     = -6;
  2423.     [ helpstring("Window long: Window parent") ]
  2424.     const int GWL_HWNDPARENT    = -8;
  2425.     [ helpstring("Window long: ID") ]
  2426.     const int GWL_ID            = -12;
  2427.     [ helpstring("Window long: User data") ]
  2428.     const int GWL_USERDATA      = -21;
  2429.     #else
  2430.     [ helpstring("Window word: Instance handle") ]
  2431.     const int GWW_HINSTANCE     = -6;
  2432.     [ helpstring("Window word: Window parent") ]
  2433.     const int GWW_HWNDPARENT    = -8;
  2434.     [ helpstring("Window word: ID") ]
  2435.     const int GWW_ID            = -12;
  2436.     #endif
  2437.  
  2438.     // Class field offsets for GetClassLong() and GetClassWord()
  2439.     [ helpstring("Class long: Menu name") ]
  2440.     const int GCL_MENUNAME      = -8;
  2441.     [ helpstring("Class long: Window proc") ]
  2442.     const int GCL_WNDPROC       = -24;
  2443.     [ helpstring("Class word: Atom") ]
  2444.     const int GCW_ATOM          = -32;
  2445.     [ helpstring("Class data: Background brush handle") ]
  2446.     const int GCD_HBRBACKGROUND = -10;
  2447.     [ helpstring("Class data: Cursor handle") ]
  2448.     const int GCD_HCURSOR       = -12;
  2449.     [ helpstring("Class data: Icon handle") ]
  2450.     const int GCD_HICON         = -14;
  2451.     [ helpstring("Class data: Module handle") ]
  2452.     const int GCD_HMODULE       = -16;
  2453.     [ helpstring("Class data: Window extra byte count") ]
  2454.     const int GCD_CBWNDEXTRA    = -18;
  2455.     [ helpstring("Class data: Class extra byte count") ]
  2456.     const int GCD_CBCLSEXTRA    = -20;
  2457.     [ helpstring("Class data: Style") ]
  2458.     const int GCD_STYLE         = -26;
  2459.     #ifdef WIN32
  2460.     [ helpstring("Class long: Background brush handle") ]
  2461.     const int GCL_HBRBACKGROUND = -10;
  2462.     [ helpstring("Class long: Cursor handle") ]
  2463.     const int GCL_HCURSOR       = -12;
  2464.     [ helpstring("Class long: Module handle") ]
  2465.     const int GCL_HICON         = -14;
  2466.     [ helpstring("Class long: Module handle") ]
  2467.     const int GCL_HMODULE       = -16;
  2468.     [ helpstring("Class long: Window extra byte count") ]
  2469.     const int GCL_CBWNDEXTRA    = -18;
  2470.     [ helpstring("Class long: Class extra byte count") ]
  2471.     const int GCL_CBCLSEXTRA    = -20;
  2472.     [ helpstring("Class data: Style") ]
  2473.     const int GCL_STYLE         = -26;
  2474.     #else
  2475.     [ helpstring("Class word: Background brush handle") ]
  2476.     const int GCW_HBRBACKGROUND = -10;
  2477.     [ helpstring("Class word: Cursor handle") ]
  2478.     const int GCW_HCURSOR       = -12;
  2479.     [ helpstring("Class word: Icon handle") ]
  2480.     const int GCW_HICON         = -14;
  2481.     [ helpstring("Class word: Module handle") ]
  2482.     const int GCW_HMODULE       = -16;
  2483.     [ helpstring("Class word: Window extra byte count") ]
  2484.     const int GCW_CBWNDEXTRA    = -18;
  2485.     [ helpstring("Class word: Class extra byte count") ]
  2486.     const int GCW_CBCLSEXTRA    = -20;
  2487.     [ helpstring("Class data: Style") ]
  2488.     const int GCW_STYLE         = -26;
  2489.     #endif
  2490.  
  2491.     // Class styles
  2492.     [ helpstring("Class style: Redraw for vertical change") ]
  2493.     const int CS_VREDRAW      = 0x0001;
  2494.     [ helpstring("Class style: Redraw for horizontal change") ]
  2495.     const int CS_HREDRAW      = 0x0002;
  2496.  
  2497.     [ helpstring("Class style: DC for each window instance") ]
  2498.     const int CS_OWNDC        = 0x0020;
  2499.     [ helpstring("Class style: DC shared by class") ]
  2500.     const int CS_CLASSDC      = 0x0040;
  2501.     [ helpstring("Class style: Use DC of parent") ]
  2502.     const int CS_PARENTDC     = 0x0080;
  2503.  
  2504.     [ helpstring("Class style: Save screen image behind window") ]
  2505.     const int CS_SAVEBITS     = 0x0800;
  2506.  
  2507.     [ helpstring("Class style: Send double click message to window") ]
  2508.     const int CS_DBLCLKS      = 0x0008;
  2509.  
  2510.     [ helpstring("Class style: Align client area on x byte boundary") ]
  2511.     const int CS_BYTEALIGNCLIENT  = 0x1000;
  2512.     [ helpstring("Class style: Align window on x byte boundary") ]
  2513.     const int CS_BYTEALIGNWINDOW  = 0x2000;
  2514.  
  2515.     [ helpstring("Class style: Inhibit close on system menu") ]
  2516.     const int CS_NOCLOSE      = 0x0200;
  2517.  
  2518.     // ???
  2519.     // const int CS_KEYCVTWINDOW    = 0x0004;
  2520.     // const int CS_NOKEYCVT      = 0x0100;
  2521.  
  2522.     [ helpstring("Class style: Application global") ]
  2523.     const int CS_GLOBALCLASS      = 0x4000;
  2524.  
  2525.     // ShowWindow/WinExec constants
  2526.  
  2527.     [ helpstring("WinExec/ShowWindow: Hide window and activate next window") ]
  2528.     const int SW_HIDE               = 0;
  2529.     [ helpstring("WinExec/ShowWindow: Activate window in its current state") ]
  2530.     const int SW_SHOWNORMAL         = 1;
  2531.     [ helpstring("WinExec/ShowWindow: Activate window in its current state") ]
  2532.     const int SW_NORMAL             = 1;
  2533.     [ helpstring("WinExec/ShowWindow: Activate and minimize window") ]
  2534.     const int SW_SHOWMINIMIZED      = 2;
  2535.     [ helpstring("WinExec/ShowWindow: Activate and maximize window") ]
  2536.     const int SW_SHOWMAXIMIZED      = 3;
  2537.     [ helpstring("WinExec/ShowWindow: Activate and maximize window") ]
  2538.     const int SW_MAXIMIZE           = 3;
  2539.     [ helpstring("WinExec/ShowWindow: Show window in current state, but don't change active window") ]
  2540.     const int SW_SHOWNOACTIVATE     = 4;
  2541.     [ helpstring("WinExec/ShowWindow: Show window in current or startup state") ]
  2542.     const int SW_SHOW               = 5;
  2543.     [ helpstring("WinExec/ShowWindow: Minimize window and make next window active") ]
  2544.     const int SW_MINIMIZE           = 6;
  2545.     [ helpstring("WinExec/ShowWindow: Minimize window, but don't change active window") ]
  2546.     const int SW_SHOWMINNOACTIVE    = 7;
  2547.     [ helpstring("WinExec/ShowWindow: Show window in current state, but don't change active window") ]
  2548.     const int SW_SHOWNA             = 8;
  2549.     [ helpstring("WinExec/ShowWindow: Make window active, and restore from miminized or maximized state") ]
  2550.     const int SW_RESTORE            = 9;
  2551.     [ helpstring("ShowWindow: Show window in startup state") ]
  2552.     const int SW_DEFAULT            = 10;
  2553.  
  2554.     /* Obsolete ShowWindow() command names
  2555.     const int HIDE_WINDOW           = 0;
  2556.     const int SHOW_OPENWINDOW       = 1;
  2557.     const int SHOW_ICONWINDOW       = 2;
  2558.     const int SHOW_FULLSCREEN       = 3;
  2559.     const int SHOW_OPENNOACTIVATE   = 4;
  2560.     */
  2561.  
  2562.     // Window Styles
  2563.  
  2564.     // Basic window types
  2565.     [ helpstring("Window style: overlapped") ]
  2566.     const long WS_OVERLAPPED    = 0x00000000;
  2567.     [ helpstring("Window style: popup") ]
  2568.     const long WS_POPUP         = 0x80000000;
  2569.     [ helpstring("Window style: child") ]
  2570.     const long WS_CHILD         = 0x40000000;
  2571.  
  2572.     // Clipping styles
  2573.     [ helpstring("Window style: clip sibblings") ]
  2574.     const long WS_CLIPSIBLINGS  = 0x04000000;
  2575.     [ helpstring("Window style: clip children") ]
  2576.     const long WS_CLIPCHILDREN  = 0x02000000;
  2577.  
  2578.     // Generic window states
  2579.     [ helpstring("Window style: visible") ]
  2580.     const long WS_VISIBLE       = 0x10000000;
  2581.     [ helpstring("Window style: disabled") ]
  2582.     const long WS_DISABLED      = 0x08000000;
  2583.  
  2584.     // Main window states
  2585.     [ helpstring("Window style: minimized") ]
  2586.     const long WS_MINIMIZE      = 0x20000000;
  2587.     [ helpstring("Window style: maximized") ]
  2588.     const long WS_MAXIMIZE      = 0x01000000;
  2589.  
  2590.     // Main window styles
  2591.     [ helpstring("Window style: has caption") ]
  2592.     const long WS_CAPTION       = 0x00C00000;   // WS_BORDER | WS_DLGFRAME
  2593.     [ helpstring("Window style: has border") ]
  2594.     const long WS_BORDER        = 0x00800000;
  2595.     [ helpstring("Window style: has dialog frame") ]
  2596.     const long WS_DLGFRAME      = 0x00400000;
  2597.     [ helpstring("Window style: has vertical scroll bar") ]
  2598.     const long WS_VSCROLL       = 0x00200000;
  2599.     [ helpstring("Window style: has horizontal scroll bar") ]
  2600.     const long WS_HSCROLL       = 0x00100000;
  2601.     [ helpstring("Window style: has system menu") ]
  2602.     const long WS_SYSMENU       = 0x00080000;
  2603.     [ helpstring("Window style: has thick frame") ]
  2604.     const long WS_THICKFRAME    = 0x00040000;
  2605.     [ helpstring("Window style: has minimize box") ]
  2606.     const long WS_MINIMIZEBOX   = 0x00020000;
  2607.     [ helpstring("Window style: has maximize box") ]
  2608.     const long WS_MAXIMIZEBOX   = 0x00010000;
  2609.  
  2610.     // Control window styles
  2611.     [ helpstring("Window style: part of group") ]
  2612.     const long WS_GROUP         = 0x00020000;
  2613.     [ helpstring("Window style: has tabstop") ]
  2614.     const long WS_TABSTOP       = 0x00010000;
  2615.  
  2616.     // Common Window Styles
  2617.     [ helpstring("Window style: overlapped window (WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX)") ]
  2618.     const long WS_OVERLAPPEDWINDOW = 0x00CF0000;
  2619.  
  2620.     [ helpstring("Window style: popup window (WS_POPUP, WS_BORDER, and WS_SYSMENU)") ]
  2621.     const long WS_POPUPWINDOW   = 0x80880000;
  2622.  
  2623.     [ helpstring("Window style: child window (WS_CHILD)") ]
  2624.     const long WS_CHILDWINDOW   = 0x40000000;
  2625.  
  2626.     // Extended Window Styles
  2627.     [ helpstring("Extended window style: dialog modal frame") ]
  2628.     const long WS_EX_DLGMODALFRAME  = 0x00000001;
  2629.     [ helpstring("Extended window style: don't notify parent") ]
  2630.     const long WS_EX_NOPARENTNOTIFY = 0x00000004;
  2631.  
  2632.     [ helpstring("Extended window style: keep topmost") ]
  2633.     const long WS_EX_TOPMOST        = 0x00000008;
  2634.     [ helpstring("Extended window style: accept dragged files") ]
  2635.     const long WS_EX_ACCEPTFILES    = 0x00000010;
  2636.     [ helpstring("Extended window style: transparent") ]
  2637.     const long WS_EX_TRANSPARENT    = 0x00000020;
  2638.  
  2639.     /* Obsolete style names
  2640.     const long WS_TILED         = 0x00000000;
  2641.     const long WS_ICONIC        = 0x20000000;
  2642.     const long WS_SIZEBOX       = 0x00040000;
  2643.     const long WS_TILEDWINDOW   = 0x00CF0000;
  2644.     */
  2645.  
  2646.     // Special value for CreateWindow, et al.
  2647.     const int HWND_DESKTOP             = 0;
  2648.  
  2649.     const UINT CW_USEDEFAULT           = H8000; // Hack to get 0x8000
  2650.  
  2651.     const UINT WPF_SETMINPOSITION      = 0x0001;
  2652.     const UINT WPF_RESTORETOMAXIMIZED  = 0x0002;
  2653.  
  2654.     // GetWindow() constants
  2655.     [ helpstring("GetWindow: Get first sibling") ]
  2656.     const int GW_HWNDFIRST  = 0;
  2657.     [ helpstring("GetWindow: Get last sibling") ]
  2658.     const int GW_HWNDLAST   = 1;
  2659.     [ helpstring("GetWindow: Get next sibling") ]
  2660.     const int GW_HWNDNEXT   = 2;
  2661.     [ helpstring("GetWindow: Get previous sibling") ]
  2662.     const int GW_HWNDPREV   = 3;
  2663.     [ helpstring("GetWindow: Get owner") ]
  2664.     const int GW_OWNER      = 4;
  2665.     [ helpstring("GetWindow: Get first child window") ]
  2666.     const int GW_CHILD      = 5;
  2667.  
  2668.     // SetWindowPos() and WINDOWPOS flags
  2669.     [ helpstring("SetWindowPos: Retain size (ignore cx and cy)") ]
  2670.     const int SWP_NOSIZE      = 0x0001;
  2671.     [ helpstring("SetWindowPos: Retain size (ignore x and y)") ]
  2672.     const int SWP_NOMOVE      = 0x0002;
  2673.     [ helpstring("SetWindowPos: Retain z-order (ignore hwndInsertAfter)") ]
  2674.     const int SWP_NOZORDER        = 0x0004;
  2675.     [ helpstring("SetWindowPos: Don't redraw window") ]
  2676.     const int SWP_NOREDRAW        = 0x0008;
  2677.     [ helpstring("SetWindowPos: Don't activate window") ]
  2678.     const int SWP_NOACTIVATE      = 0x0010;
  2679.     [ helpstring("SetWindowPos: Send WM_NCCALCSIZE") ]
  2680.     const int SWP_FRAMECHANGED    = 0x0020; // The frame changed: send WM_NCCALCSIZE
  2681.     [ helpstring("SetWindowPos: Display window") ]
  2682.     const int SWP_SHOWWINDOW      = 0x0040;
  2683.     [ helpstring("SetWindowPos: Hide window") ]
  2684.     const int SWP_HIDEWINDOW      = 0x0080;
  2685.     [ helpstring("SetWindowPos: Don't copy bits of client area") ]
  2686.     const int SWP_NOCOPYBITS      = 0x0100;
  2687.     [ helpstring("SetWindowPos: Don't do owner z-ordering") ]
  2688.     const int SWP_NOOWNERZORDER   = 0x0200; // Don't do owner Z ordering
  2689.  
  2690.     [ helpstring("SetWindowPos: Draw frame around window") ]
  2691.     const int SWP_DRAWFRAME       = 0x0020;
  2692.     [ helpstring("SetWindowPos: Don't do owner z-ordering") ]
  2693.     const int SWP_NOREPOSITION    = 0x0200;
  2694.  
  2695.     const int SWP_NOSENDCHANGING  = 0x0400;
  2696.     const int SWP_DEFERERASE      = 0x2000;
  2697.  
  2698.     // SetWindowPos() hwndInsertAfter field values
  2699.     [ helpstring("SetWindowPos: Put at top of z-order") ]
  2700.     const int HWND_TOP            = 0;
  2701.     [ helpstring("SetWindowPos: Put at bottom of z-order") ]
  2702.     const int HWND_BOTTOM         = 1;
  2703.     [ helpstring("SetWindowPos: Put above all non-topmost windows in z-order") ]
  2704.     const int HWND_TOPMOST        = -1;
  2705.     [ helpstring("SetWindowPos: Put at top non-topmost windows in z-order") ]
  2706.     const int HWND_NOTOPMOST      = -2;
  2707.  
  2708.     /*
  2709.     const long DCX_WINDOW         = 0x00000001;
  2710.     const long DCX_CACHE          = 0x00000002;
  2711.     const long DCX_CLIPCHILDREN   = 0x00000008;
  2712.     const long DCX_CLIPSIBLINGS   = 0x00000010;
  2713.     const long DCX_PARENTCLIP     = 0x00000020;
  2714.  
  2715.     const long DCX_EXCLUDERGN     = 0x00000040;
  2716.     const long DCX_INTERSECTRGN   = 0x00000080;
  2717.  
  2718.     const long DCX_LOCKWINDOWUPDATE = 0x00000400;
  2719.  
  2720.     const long DCX_USESTYLE       = 0x00010000;
  2721.  
  2722.     const int RDW_INVALIDATE      = 0001;
  2723.     const int RDW_INTERNALPAINT   = 0002;
  2724.     const int RDW_ERASE           = 0004;
  2725.  
  2726.     const int RDW_VALIDATE        = 0008;
  2727.     const int RDW_NOINTERNALPAINT = 0010;
  2728.     const int RDW_NOERASE         = 0020;
  2729.  
  2730.     const int RDW_NOCHILDREN      = 0040;
  2731.     const int RDW_ALLCHILDREN     = 0080;
  2732.  
  2733.     const int RDW_UPDATENOW       = 0100;
  2734.     const int RDW_ERASENOW        = 0200;
  2735.  
  2736.     const int RDW_FRAME           = 0400;
  2737.     const int RDW_NOFRAME         = 0800;
  2738.  
  2739.     const int SW_SCROLLCHILDREN   = 0001;
  2740.     const int SW_INVALIDATE       = 0002;
  2741.     const int SW_ERASE            = 0004;
  2742.  
  2743.     // Predefined Clipboard Formats
  2744.     const int CF_TEXT          = 1;
  2745.     const int CF_BITMAP        = 2;
  2746.     const int CF_METAFILEPICT  = 3;
  2747.     const int CF_SYLK          = 4;
  2748.     const int CF_DIF           = 5;
  2749.     const int CF_TIFF          = 6;
  2750.     const int CF_OEMTEXT       = 7;
  2751.     const int CF_DIB           = 8;
  2752.     const int CF_PALETTE       = 9;
  2753.     const int CF_PENDATA       = 10;
  2754.     const int CF_RIFF          = 11;
  2755.     const int CF_WAVE          = 12;
  2756.  
  2757.     const int CF_OWNERDISPLAY  = 0x0080;
  2758.     const int CF_DSPTEXT      = 0x0081;
  2759.     const int CF_DSPBITMAP        = 0x0082;
  2760.     const int CF_DSPMETAFILEPICT  = 0x0083;
  2761.  
  2762.     // Private formats don't get GlobalFree()'d
  2763.     const int CF_PRIVATEFIRST  = 0x0200;
  2764.     const int CF_PRIVATELAST      = 0x02FF;
  2765.  
  2766.     // GDIOBJ formats do get DeleteObject()'d
  2767.     const int CF_GDIOBJFIRST      = 0x0300;
  2768.     const int CF_GDIOBJLAST       = 0x03FF;
  2769.     */
  2770.  
  2771.     // Standard cursor resource IDs
  2772.     [ helpstring("Standard cursor: Arrow") ]
  2773.     const long IDC_ARROW          = 32512;
  2774.     [ helpstring("Standard cursor: I-Beam") ]
  2775.     const long IDC_IBEAM          = 32513;
  2776.     [ helpstring("Standard cursor: Hourglass") ]
  2777.     const long IDC_WAIT           = 32514;
  2778.     [ helpstring("Standard cursor: Cross") ]
  2779.     const long IDC_CROSS          = 32515;
  2780.     [ helpstring("Standard cursor: Up arrow") ]
  2781.     const long IDC_UPARROW        = 32516;
  2782.     [ helpstring("Standard cursor: Resize") ]
  2783.     const long IDC_SIZE           = 32640;
  2784.     [ helpstring("Standard cursor: Icon") ]
  2785.     const long IDC_ICON           = 32641;
  2786.     [ helpstring("Standard cursor: Northwest-southeast size") ]
  2787.     const long IDC_SIZENWSE       = 32642;
  2788.     [ helpstring("Standard cursor: Northeast-southwest size") ]
  2789.     const long IDC_SIZENESW       = 32643;
  2790.     [ helpstring("Standard cursor: West-east size") ]
  2791.     const long IDC_SIZEWE         = 32644;
  2792.     [ helpstring("Standard cursor: North-south size") ]
  2793.     const long IDC_SIZENS         = 32645;
  2794.  
  2795.     // Standard icon resource IDs
  2796.     [ helpstring("Standard icon: Application") ]
  2797.     const long IDI_APPLICATION  = 32512;
  2798.     [ helpstring("Standard icon: Hand") ]
  2799.     const long IDI_HAND         = 32513;
  2800.     [ helpstring("Standard icon: Question mark") ]
  2801.     const long IDI_QUESTION     = 32514;
  2802.     [ helpstring("Standard icon: Exclamation mark") ]
  2803.     const long IDI_EXCLAMATION  = 32515;
  2804.     [ helpstring("Standard icon: Asterisk") ]
  2805.     const long IDI_ASTERISK     = 32516;
  2806.  
  2807.     #if WIN32
  2808.     [ helpstring("LoadImage: Bitmap") ]
  2809.     const long IMAGE_BITMAP         = 0;
  2810.     [ helpstring("LoadImage: Icon") ]
  2811.     const long IMAGE_ICON           = 1;
  2812.     [ helpstring("LoadImage: Cursor") ]
  2813.     const long IMAGE_CURSOR         = 2;
  2814.     [ helpstring("LoadImage: Metafile") ]
  2815.     const long IMAGE_ENHMETAFILE    = 3;
  2816.  
  2817.     [ helpstring("LoadImage: Use the color format of the display") ]
  2818.     const long LR_DEFAULTCOLOR      = 0x0000;
  2819.     [ helpstring("LoadImage or CopyImage: Convert to black and white") ]
  2820.     const long LR_MONOCHROME        = 0x0001;
  2821.     const long LR_COLOR             = 0x0002;
  2822.     [ helpstring("CopyImage: Copy exactly, ignoring desired size") ]
  2823.     const long LR_COPYRETURNORG     = 0x0004;
  2824.     [ helpstring("CopyImage: Delete original image after making copy") ]
  2825.     const long LR_COPYDELETEORG     = 0x0008;
  2826.     [ helpstring("LoadImage: Load from file rather than resource") ]
  2827.     const long LR_LOADFROMFILE      = 0x0010;
  2828.     [ helpstring("LoadImage: Use window color for all pixels matching color of first image pixel") ]
  2829.     const long LR_LOADTRANSPARENT   = 0x0020;
  2830.     [ helpstring("LoadImage: Use system default size or resource default size") ]
  2831.     const long LR_DEFAULTSIZE       = 0x0040;
  2832.     const long LR_LOADREALSIZE      = 0x0080;
  2833.     [ helpstring("LoadImage: Replace shades of gray with 3D system colors") ]
  2834.     const long LR_LOADMAP3DCOLORS   = 0x1000;
  2835.     const long LR_CREATEDIBSECTION  = 0x2000;
  2836.  
  2837.     [ helpstring("DrawIconEx: Blits the mask") ]
  2838.     const long DI_MASK              = 0x0001;
  2839.     [ helpstring("DrawIconEx: Blits the image") ]
  2840.     const long DI_IMAGE             = 0x0002;
  2841.     [ helpstring("DrawIconEx: Blits the image and mask") ]
  2842.     const long DI_NORMAL            = 0x0003;
  2843.     [ helpstring("DrawIconEx: Uses the system default images rather than given image") ]
  2844.     const long DI_COMPAT            = 0x0004;
  2845.     [ helpstring("DrawIconEx: Draws default size, ignoring width and height arguments") ]
  2846.     const long DI_DEFAULTSIZE       = 0x0008;
  2847.     #endif
  2848.  
  2849.     /*
  2850.     const int MB_OK           = 0x0000;
  2851.     const int MB_OKCANCEL     = 0x0001;
  2852.     const int MB_ABORTRETRYIGNORE = 0x0002;
  2853.     const int MB_YESNOCANCEL      = 0x0003;
  2854.     const int MB_YESNO        = 0x0004;
  2855.     const int MB_RETRYCANCEL      = 0x0005;
  2856.     const int MB_TYPEMASK     = 0x000F;
  2857.  
  2858.     const int MB_ICONHAND     = 0x0010;
  2859.     const int MB_ICONQUESTION     = 0x0020;
  2860.     const int MB_ICONEXCLAMATION  = 0x0030;
  2861.     const int MB_ICONASTERISK  = 0x0040;
  2862.     const int MB_ICONMASK     = 0x00F0;
  2863.  
  2864.     const int MB_ICONINFORMATION  = 0x0040;
  2865.     const int MB_ICONSTOP      = 0x0010;
  2866.  
  2867.     const int MB_DEFBUTTON1       = 0x0000;
  2868.     const int MB_DEFBUTTON2       = 0x0100;
  2869.     const int MB_DEFBUTTON3       = 0x0200;
  2870.     const int MB_DEFMASK      = 0x0F00;
  2871.  
  2872.     const int MB_APPLMODAL        = 0x0000;
  2873.     const int MB_SYSTEMMODAL      = 0x1000;
  2874.     const int MB_TASKMODAL        = 0x2000;
  2875.  
  2876.     const int MB_NOFOCUS      = 0x8000;
  2877.  
  2878.     const int MDIS_ALLCHILDSTYLES = 0x0001;
  2879.     */
  2880.  
  2881.     /*
  2882.     // Dialog window class
  2883.     const int MAXINTATOM = 0xC000;
  2884.     //define MAKEINTATOM(i) (LPTSTR)((DWORD)((WORD)(i)))
  2885.     const int INVALID_ATOM  = 0;
  2886.  
  2887.     const int WC_DIALOG   (MAKEINTATOM(0x8002))
  2888.  
  2889.     // cbWndExtra bytes needed by dialog manager for dialog classes
  2890.     const int DLGWINDOWEXTRA  = 30;
  2891.  
  2892.     // Dialog styles
  2893.     const long DS_ABSALIGN        = 0x01;
  2894.     const long DS_SYSMODAL        = 0x02;
  2895.     const long DS_LOCALEDIT        = 0x20;
  2896.     const long DS_SETFONT          = 0x40;
  2897.     const long DS_MODALFRAME       = 0x80;
  2898.     const long DS_NOIDLEMSG        = 0x100;
  2899.  
  2900.     // Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  2901.     const int DWL_MSGRESULT   = 0;
  2902.     const int DWL_DLGPROC = 4;
  2903.     const int DWL_USER    = 8;
  2904.  
  2905.     // Standard dialog button IDs
  2906.     const int IDOK            = 1;
  2907.     const int IDCANCEL        = 2;
  2908.     const int IDABORT     = 3;
  2909.     const int IDRETRY     = 4;
  2910.     const int IDIGNORE        = 5;
  2911.     const int IDYES           = 6;
  2912.     const int IDNO            = 7;
  2913.     */
  2914.  
  2915.     // ****** Owner draw control support ********
  2916.     /*
  2917.     // Owner draw control types
  2918.     const int ODT_MENU    = 1;
  2919.     const int ODT_LISTBOX = 2;
  2920.     const int ODT_COMBOBOX    = 3;
  2921.     const int ODT_BUTTON  = 4;
  2922.  
  2923.     // Owner draw actions
  2924.     const int ODA_DRAWENTIRE  = 0x0001;
  2925.     const int ODA_SELECT  = 0x0002;
  2926.     const int ODA_FOCUS   = 0x0004;
  2927.  
  2928.     // Owner draw state
  2929.     const int ODS_SELECTED    = 0x0001;
  2930.     const int ODS_GRAYED  = 0x0002;
  2931.     const int ODS_DISABLED    = 0x0004;
  2932.     const int ODS_CHECKED = 0x0008;
  2933.     const int ODS_FOCUS   = 0x0010;
  2934.     */
  2935.  
  2936.     // ****** Static control *******
  2937.     /*
  2938.     // Static Control Styles
  2939.     const DWORD SS_LEFT        = 0x00000000;
  2940.     const DWORD SS_CENTER      = 0x00000001;
  2941.     const DWORD SS_RIGHT       = 0x00000002;
  2942.     const DWORD SS_ICON        = 0x00000003;
  2943.     const DWORD SS_BLACKRECT       = 0x00000004;
  2944.     const DWORD SS_GRAYRECT        = 0x00000005;
  2945.     const DWORD SS_WHITERECT       = 0x00000006;
  2946.     const DWORD SS_BLACKFRAME      = 0x00000007;
  2947.     const DWORD SS_GRAYFRAME       = 0x00000008;
  2948.     const DWORD SS_WHITEFRAME      = 0x00000009;
  2949.     const DWORD SS_SIMPLE      = 0x0000000B;
  2950.     const DWORD SS_LEFTNOWORDWRAP   = 0x0000000C;
  2951.     const DWORD SS_NOPREFIX         = 0x00000080;
  2952.  
  2953.     // ****** Button control ******
  2954.  
  2955.     // Button Control Styles
  2956.     const DWORD BS_PUSHBUTTON      = 0x00000000;
  2957.     const DWORD BS_DEFPUSHBUTTON    = 0x00000001;
  2958.     const DWORD BS_CHECKBOX        = 0x00000002;
  2959.     const DWORD BS_AUTOCHECKBOX     = 0x00000003;
  2960.     const DWORD BS_RADIOBUTTON     = 0x00000004;
  2961.     const DWORD BS_3STATE      = 0x00000005;
  2962.     const DWORD BS_AUTO3STATE      = 0x00000006;
  2963.     const DWORD BS_GROUPBOX        = 0x00000007;
  2964.     const DWORD BS_USERBUTTON      = 0x00000008;
  2965.     const DWORD BS_AUTORADIOBUTTON  = 0x00000009;
  2966.     const DWORD BS_OWNERDRAW       = 0x0000000B;
  2967.     const DWORD BS_LEFTTEXT        = 0x00000020;
  2968.     */
  2969.  
  2970.     // ****** Edit control ********
  2971.  
  2972.     // Edit control styles
  2973.     const DWORD ES_LEFT        = 0x00000000;
  2974.     const DWORD ES_CENTER      = 0x00000001;
  2975.     const DWORD ES_RIGHT       = 0x00000002;
  2976.     const DWORD ES_MULTILINE   = 0x00000004;
  2977.     const DWORD ES_UPPERCASE   = 0x00000008;
  2978.     const DWORD ES_LOWERCASE   = 0x00000010;
  2979.     const DWORD ES_PASSWORD    = 0x00000020;
  2980.     const DWORD ES_AUTOVSCROLL = 0x00000040;
  2981.     const DWORD ES_AUTOHSCROLL = 0x00000080;
  2982.     const DWORD ES_NOHIDESEL   = 0x00000100;
  2983.     const DWORD ES_OEMCONVERT  = 0x00000400;
  2984.     const DWORD ES_READONLY    = 0x00000800;
  2985.     const DWORD ES_WANTRETURN  = 0x00001000;
  2986.  
  2987.     // ****** Scroll bar control ******
  2988.  
  2989.     /*
  2990.     // Also see scrolling support
  2991.  
  2992.     // Scroll bar styles
  2993.     const DWORD SBS_HORZ           = 0x0000;
  2994.     const DWORD SBS_VERT           = 0x0001;
  2995.     const DWORD SBS_TOPALIGN           = 0x0002;
  2996.     const DWORD SBS_LEFTALIGN          = 0x0002;
  2997.     const DWORD SBS_BOTTOMALIGN            = 0x0004;
  2998.     const DWORD SBS_RIGHTALIGN         = 0x0004;
  2999.     const DWORD SBS_SIZEBOXTOPLEFTALIGN        = 0x0002;
  3000.     const DWORD SBS_SIZEBOXBOTTOMRIGHTALIGN = 0x0004;
  3001.     const DWORD SBS_SIZEBOX            = 0x0008;
  3002.     */
  3003.  
  3004.     // ****** Listbox control *****
  3005.  
  3006.     // Listbox styles
  3007.     const DWORD LBS_NOTIFY            = 0x0001;
  3008.     const DWORD LBS_SORT              = 0x0002;
  3009.     const DWORD LBS_NOREDRAW          = 0x0004;
  3010.     const DWORD LBS_MULTIPLESEL       = 0x0008;
  3011.     const DWORD LBS_OWNERDRAWFIXED    = 0x0010;
  3012.     const DWORD LBS_OWNERDRAWVARIABLE = 0x0020;
  3013.     const DWORD LBS_HASSTRINGS        = 0x0040;
  3014.     const DWORD LBS_USETABSTOPS       = 0x0080;
  3015.     const DWORD LBS_NOINTEGRALHEIGHT  = 0x0100;
  3016.     const DWORD LBS_MULTICOLUMN       = 0x0200;
  3017.     const DWORD LBS_WANTKEYBOARDINPUT = 0x0400;
  3018.     const DWORD LBS_EXTENDEDSEL       = 0x0800;
  3019.     const DWORD LBS_DISABLENOSCROLL   = 0x1000;
  3020.     const DWORD LBS_STANDARD          = 0x00A00003;
  3021.  
  3022.     // DlgDirList, DlgDirListComboBox flags values
  3023.     const UINT DDL_READWRITE          = 0x0000;
  3024.     const UINT DDL_READONLY           = 0x0001;
  3025.     const UINT DDL_HIDDEN             = 0x0002;
  3026.     const UINT DDL_SYSTEM             = 0x0004;
  3027.     const UINT DDL_DIRECTORY          = 0x0010;
  3028.     const UINT DDL_ARCHIVE            = 0x0020;
  3029.  
  3030.     const UINT DDL_POSTMSGS           = 0x2000;
  3031.     const UINT DDL_DRIVES             = 0x4000;
  3032.     const UINT DDL_EXCLUSIVE          = H8000; // Hack to get 0x8000
  3033.  
  3034.     // ****** Combo box control ***
  3035.  
  3036.     // Combo box styles
  3037.     const DWORD CBS_SIMPLE       = 0x0001;
  3038.     const DWORD CBS_DROPDOWN         = 0x0002;
  3039.     const DWORD CBS_DROPDOWNLIST      = 0x0003;
  3040.     const DWORD CBS_OWNERDRAWFIXED    = 0x0010;
  3041.     const DWORD CBS_OWNERDRAWVARIABLE = 0x0020;
  3042.     const DWORD CBS_AUTOHSCROLL       = 0x0040;
  3043.     const DWORD CBS_OEMCONVERT        = 0x0080;
  3044.     const DWORD CBS_SORT              = 0x0100;
  3045.     const DWORD CBS_HASSTRINGS        = 0x0200;
  3046.     const DWORD CBS_NOINTEGRALHEIGHT  = 0x0400;
  3047.     const DWORD CBS_DISABLENOSCROLL   = 0x0800;
  3048.  
  3049.     /*
  3050.     // Standard hook code
  3051.     const int HC_ACTION       = 0;
  3052.  
  3053.     // Obsolete hook codes (NO LONGER SUPPORTED)
  3054.     const int HC_GETLPLPFN        = -3;
  3055.     const int HC_LPLPFNNEXT       = -2;
  3056.     const int HC_LPFNNEXT         = -1;
  3057.  
  3058.     // CallMsgFilter() and WH_SYS/MSGFILTER context codes
  3059.     const int MSGF_DIALOGBOX       = 0;
  3060.     const int MSGF_MENU        = 2;
  3061.     const int MSGF_MOVE        = 3;
  3062.     const int MSGF_SIZE        = 4;
  3063.     const int MSGF_SCROLLBAR       = 5;
  3064.     const int MSGF_NEXTWINDOW  = 6;
  3065.     const int MSGF_MAINLOOP             = 8;
  3066.     const int MSGF_USER                 = 4096;
  3067.  
  3068.     const int WH_GETMESSAGE       = 3;
  3069.  
  3070.     const int WH_CALLWNDPROC      = 4;
  3071.  
  3072.     const int WH_MSGFILTER        = -1;
  3073.     const int WH_SYSMSGFILTER     = 6;
  3074.  
  3075.     // SetWindowsHook() keyboard hook
  3076.     const int WH_KEYBOARD     = 2;
  3077.  
  3078.     // SetWindowsHook() mouse hook
  3079.     const int WH_MOUSE        = 7;
  3080.  
  3081.     const int WH_HARDWARE     = 8;
  3082.  
  3083.     // SetWindowsHook() code
  3084.     const int WH_CBT          = 5;
  3085.  
  3086.     // SetWindowsHook() Shell hook code
  3087.     const int WH_SHELL            = 10;
  3088.  
  3089.     // Journalling hook codes
  3090.     const int HC_GETNEXT      = 1;
  3091.     const int HC_SKIP     = 2;
  3092.     const int HC_NOREMOVE     = 3;
  3093.     const int HC_NOREM        = 3;
  3094.     const int HC_SYSMODALON        = 4;
  3095.     const int HC_SYSMODALOFF      = 5;
  3096.  
  3097.     // SetWindowsHook debug hook support
  3098.     const int WH_DEBUG        = 9;
  3099.  
  3100.     const int HCBT_MOVESIZE       = 0;
  3101.     const int HCBT_MINMAX     = 1;
  3102.     const int HCBT_QS     = 2;
  3103.     const int HCBT_CREATEWND      = 3;
  3104.     const int HCBT_DESTROYWND     = 4;
  3105.     const int HCBT_ACTIVATE       = 5;
  3106.     const int HCBT_CLICKSKIPPED    = 6;
  3107.     const int HCBT_KEYSKIPPED  = 7;
  3108.     const int HCBT_SYSCOMMAND     = 8;
  3109.     const int HCBT_SETFOCUS       = 9;
  3110.  
  3111.     const int HSHELL_WINDOWCREATED        = 1;
  3112.     const int HSHELL_WINDOWDESTROYED  = 2;
  3113.     const int HSHELL_ACTIVATESHELLWINDOW = 3;
  3114.  
  3115.     const int WH_JOURNALRECORD     = 0;
  3116.     const int WH_JOURNALPLAYBACK  = 1;
  3117.  
  3118.     // Flags returned by GetSystemDebugState.
  3119.  
  3120.     const UINT SDS_MENU         = 0x0001;
  3121.     const UINT SDS_SYSMODAL     = 0x0002;
  3122.     const UINT SDS_NOTASKQUEUE = 0x0004;
  3123.     const UINT SDS_DIALOG   = 0x0008;
  3124.     const UINT SDS_TASKLOCKED  = 0x0010;
  3125.  
  3126.     // WinHelp() commands
  3127.     const UINT HELP_CONTEXT       = 0x0001;
  3128.     const UINT HELP_QUIT          = 0x0002;
  3129.     const UINT HELP_INDEX     = 0x0003;
  3130.     const UINT HELP_CONTENTS      = 0x0003;
  3131.     const UINT HELP_HELPONHELP   = 0x0004;
  3132.     const UINT HELP_SETINDEX      = 0x0005;
  3133.     const UINT HELP_SETCONTENTS  = 0x0005;
  3134.     const UINT HELP_CONTEXTPOPUP = 0x0008;
  3135.     const UINT HELP_FORCEFILE    = 0x0009;
  3136.     const UINT HELP_KEY           = 0x0101;
  3137.     const UINT HELP_COMMAND       = 0x0102;
  3138.     const UINT HELP_PARTIALKEY   = 0x0105;
  3139.     const UINT HELP_MULTIKEY      = 0x0201;
  3140.     const UINT HELP_SETWINPOS    = 0x0203;
  3141.     */
  3142.  
  3143.     [ helpstring("Virtual key: Left mouse button") ]
  3144.     const int VK_LBUTTON    = 0x1;
  3145.     [ helpstring("Virtual key: Right mouse button") ]
  3146.     const int VK_RBUTTON    = 0x2;
  3147.     [ helpstring("Virtual key: Used for control+break processing") ]
  3148.     const int VK_CANCEL     = 0x3;
  3149.     [ helpstring("Virtual key: Middle mouse button") ]
  3150.     const int VK_MBUTTON    = 0x4;
  3151.     [ helpstring("Virtual key: Backspace") ]
  3152.     const int VK_BACK       = 0x8;
  3153.     [ helpstring("Virtual key: Tab") ]
  3154.     const int VK_TAB        = 0x9;
  3155.     [ helpstring("Virtual key: Clear") ]
  3156.     const int VK_CLEAR      = 0xC;
  3157.     [ helpstring("Virtual key: Enter") ]
  3158.     const int VK_RETURN     = 0xD;
  3159.     [ helpstring("Virtual key: Shift") ]
  3160.     const int VK_SHIFT      = 0x10;
  3161.     [ helpstring("Virtual key: Ctrl") ]
  3162.     const int VK_CONTROL    = 0x11;
  3163.     [ helpstring("Virtual key: Alt") ]
  3164.     const int VK_MENU       = 0x12;
  3165.     [ helpstring("Virtual key: Pause") ]
  3166.     const int VK_PAUSE      = 0x13;
  3167.     [ helpstring("Virtual key: Caps Lock") ]
  3168.     const int VK_CAPITAL    = 0x14;
  3169.     [ helpstring("Virtual key: Esc") ]
  3170.     const int VK_ESCAPE     = 0x1B;
  3171.     [ helpstring("Virtual key: Spacebar") ]
  3172.     const int VK_SPACE      = 0x20;
  3173.     [ helpstring("Virtual key: Page Up") ]
  3174.     const int VK_PRIOR      = 0x21;
  3175.     [ helpstring("Virtual key: Page Down") ]
  3176.     const int VK_NEXT       = 0x22;
  3177.     [ helpstring("Virtual key: End") ]
  3178.     const int VK_END        = 0x23;
  3179.     [ helpstring("Virtual key: Home") ]
  3180.     const int VK_HOME       = 0x24;
  3181.     [ helpstring("Virtual key: Left Arrow") ]
  3182.     const int VK_LEFT       = 0x25;
  3183.     [ helpstring("Virtual key: Right Arrow") ]
  3184.     const int VK_UP         = 0x26;
  3185.     [ helpstring("Virtual key: Up Arrow") ]
  3186.     const int VK_RIGHT      = 0x27;
  3187.     [ helpstring("Virtual key: Down Arrow") ]
  3188.     const int VK_DOWN       = 0x28;
  3189.     [ helpstring("Virtual key: Select") ]
  3190.     const int VK_SELECT     = 0x29;
  3191.     [ helpstring("Virtual key: OEM Specific") ]
  3192.     const int VK_PRINT      = 0x2A;
  3193.     [ helpstring("Virtual key: Execute") ]
  3194.     const int VK_EXECUTE    = 0x2B;
  3195.     [ helpstring("Virtual key: PrtScr") ]
  3196.     const int VK_SNAPSHOT   = 0x2C;
  3197.     [ helpstring("Virtual key: Ins") ]
  3198.     const int VK_INSERT     = 0x2D;
  3199.     [ helpstring("Virtual key: Del") ]
  3200.     const int VK_DELETE     = 0x2E;
  3201.     [ helpstring("Virtual key: Help") ]
  3202.     const int VK_HELP       = 0x2F;
  3203.     [ helpstring("Virtual key: 0") ]
  3204.     const int VK_0          = 0x30;
  3205.     [ helpstring("Virtual key: 1") ]
  3206.     const int VK_1          = 0x31;
  3207.     [ helpstring("Virtual key: 2") ]
  3208.     const int VK_2          = 0x32;
  3209.     [ helpstring("Virtual key: 3") ]
  3210.     const int VK_3          = 0x33;
  3211.     [ helpstring("Virtual key: 4") ]
  3212.     const int VK_4          = 0x34;
  3213.     [ helpstring("Virtual key: 5") ]
  3214.     const int VK_5          = 0x35;
  3215.     [ helpstring("Virtual key: 6") ]
  3216.     const int VK_6          = 0x36;
  3217.     [ helpstring("Virtual key: 7") ]
  3218.     const int VK_7          = 0x37;
  3219.     [ helpstring("Virtual key: 8") ]
  3220.     const int VK_8          = 0x38;
  3221.     [ helpstring("Virtual key: 9") ]
  3222.     const int VK_9          = 0x39;
  3223.     [ helpstring("Virtual key: A") ]
  3224.     const int VK_A          = 0x41;
  3225.     [ helpstring("Virtual key: B") ]
  3226.     const int VK_B          = 0x42;
  3227.     [ helpstring("Virtual key: C") ]
  3228.     const int VK_C          = 0x43;
  3229.     [ helpstring("Virtual key: D") ]
  3230.     const int VK_D          = 0x44;
  3231.     [ helpstring("Virtual key: E") ]
  3232.     const int VK_E          = 0x45;
  3233.     [ helpstring("Virtual key: F") ]
  3234.     const int VK_F          = 0x46;
  3235.     [ helpstring("Virtual key: G") ]
  3236.     const int VK_G          = 0x47;
  3237.     [ helpstring("Virtual key: H") ]
  3238.     const int VK_H          = 0x48;
  3239.     [ helpstring("Virtual key: I") ]
  3240.     const int VK_I          = 0x49;
  3241.     [ helpstring("Virtual key: J") ]
  3242.     const int VK_J          = 0x4A;
  3243.     [ helpstring("Virtual key: K") ]
  3244.     const int VK_K          = 0x4B;
  3245.     [ helpstring("Virtual key: L") ]
  3246.     const int VK_L          = 0x4C;
  3247.     [ helpstring("Virtual key: M") ]
  3248.     const int VK_M          = 0x4D;
  3249.     [ helpstring("Virtual key: N") ]
  3250.     const int VK_N          = 0x4E;
  3251.     [ helpstring("Virtual key: O") ]
  3252.     const int VK_O          = 0x4F;
  3253.     [ helpstring("Virtual key: P") ]
  3254.     const int VK_P          = 0x50;
  3255.     [ helpstring("Virtual key: Q") ]
  3256.     const int VK_Q          = 0x51;
  3257.     [ helpstring("Virtual key: R") ]
  3258.     const int VK_R          = 0x52;
  3259.     [ helpstring("Virtual key: S") ]
  3260.     const int VK_S          = 0x53;
  3261.     [ helpstring("Virtual key: T") ]
  3262.     const int VK_T          = 0x54;
  3263.     [ helpstring("Virtual key: U") ]
  3264.     const int VK_U          = 0x55;
  3265.     [ helpstring("Virtual key: V") ]
  3266.     const int VK_V          = 0x56;
  3267.     [ helpstring("Virtual key: W") ]
  3268.     const int VK_W          = 0x57;
  3269.     [ helpstring("Virtual key: X") ]
  3270.     const int VK_X          = 0x58;
  3271.     [ helpstring("Virtual key: Y") ]
  3272.     const int VK_Y          = 0x59;
  3273.     [ helpstring("Virtual key: Z") ]
  3274.     const int VK_Z          = 0x5A;
  3275.     [ helpstring("Virtual key: 0 on number pad") ]
  3276.     const int VK_NUMPAD0    = 0x60;
  3277.     [ helpstring("Virtual key: 1 on number pad") ]
  3278.     const int VK_NUMPAD1    = 0x61;
  3279.     [ helpstring("Virtual key: 2 on number pad") ]
  3280.     const int VK_NUMPAD2    = 0x62;
  3281.     [ helpstring("Virtual key: 3 on number pad") ]
  3282.     const int VK_NUMPAD3    = 0x63;
  3283.     [ helpstring("Virtual key: 4 on number pad") ]
  3284.     const int VK_NUMPAD4    = 0x64;
  3285.     [ helpstring("Virtual key: 5 on number pad") ]
  3286.     const int VK_NUMPAD5    = 0x65;
  3287.     [ helpstring("Virtual key: 6 on number pad") ]
  3288.     const int VK_NUMPAD6    = 0x66;
  3289.     [ helpstring("Virtual key: 7 on number pad") ]
  3290.     const int VK_NUMPAD7    = 0x67;
  3291.     [ helpstring("Virtual key: 8 on number pad") ]
  3292.     const int VK_NUMPAD8    = 0x68;
  3293.     [ helpstring("Virtual key: 9 on number pad") ]
  3294.     const int VK_NUMPAD9    = 0x69;
  3295.     [ helpstring("Virtual key: Multiply") ]
  3296.     const int VK_MULTIPLY   = 0x6A;
  3297.     [ helpstring("Virtual key: Add") ]
  3298.     const int VK_ADD        = 0x6B;
  3299.     [ helpstring("Virtual key: Separator") ]
  3300.     const int VK_SEPARATOR  = 0x6C;
  3301.     [ helpstring("Virtual key: Subtract") ]
  3302.     const int VK_SUBTRACT   = 0x6D;
  3303.     [ helpstring("Virtual key: Decimal") ]
  3304.     const int VK_DECIMAL    = 0x6E;
  3305.     [ helpstring("Virtual key: Divide") ]
  3306.     const int VK_DIVIDE     = 0x6F;
  3307.     [ helpstring("Virtual key: F1") ]
  3308.     const int VK_F1         = 0x70;
  3309.     [ helpstring("Virtual key: F2") ]
  3310.     const int VK_F2         = 0x71;
  3311.     [ helpstring("Virtual key: F3") ]
  3312.     const int VK_F3         = 0x72;
  3313.     [ helpstring("Virtual key: F4") ]
  3314.     const int VK_F4         = 0x73;
  3315.     [ helpstring("Virtual key: F5") ]
  3316.     const int VK_F5         = 0x74;
  3317.     [ helpstring("Virtual key: F6") ]
  3318.     const int VK_F6         = 0x75;
  3319.     [ helpstring("Virtual key: F7") ]
  3320.     const int VK_F7         = 0x76;
  3321.     [ helpstring("Virtual key: F8") ]
  3322.     const int VK_F8         = 0x77;
  3323.     [ helpstring("Virtual key: F9") ]
  3324.     const int VK_F9         = 0x78;
  3325.     [ helpstring("Virtual key: F10") ]
  3326.     const int VK_F10        = 0x79;
  3327.     [ helpstring("Virtual key: F11") ]
  3328.     const int VK_F11        = 0x7A;
  3329.     [ helpstring("Virtual key: F12") ]
  3330.     const int VK_F12        = 0x7B;
  3331.     [ helpstring("Virtual key: F13") ]
  3332.     const int VK_F13        = 0x7C;
  3333.     [ helpstring("Virtual key: F14") ]
  3334.     const int VK_F14        = 0x7D;
  3335.     [ helpstring("Virtual key: F15") ]
  3336.     const int VK_F15        = 0x7E;
  3337.     [ helpstring("Virtual key: F16") ]
  3338.     const int VK_F16        = 0x7F;
  3339.     [ helpstring("Virtual key: F17") ]
  3340.     const int VK_F17        = 0x80;
  3341.     [ helpstring("Virtual key: F18") ]
  3342.     const int VK_F18        = 0x81;
  3343.     [ helpstring("Virtual key: F19") ]
  3344.     const int VK_F19        = 0x82;
  3345.     [ helpstring("Virtual key: F20") ]
  3346.     const int VK_F20        = 0x83;
  3347.     [ helpstring("Virtual key: F21") ]
  3348.     const int VK_F21        = 0x84;
  3349.     [ helpstring("Virtual key: F22") ]
  3350.     const int VK_F22        = 0x85;
  3351.     [ helpstring("Virtual key: F23") ]
  3352.     const int VK_F23        = 0x86;
  3353.     [ helpstring("Virtual key: F24") ]
  3354.     const int VK_F24        = 0x87;
  3355.     [ helpstring("Virtual key: NumLock") ]
  3356.     const int VK_NUMLOCK    = 0x90;
  3357.     [ helpstring("Virtual key: ScrollLock") ]
  3358.     const int VK_SCROLL     = 0x91;
  3359.  
  3360.     const UINT MF_INSERT      = 0x0000;
  3361.     const UINT MF_CHANGE      = 0x0080;
  3362.     const UINT MF_APPEND      = 0x0100;
  3363.     const UINT MF_DELETE      = 0x0200;
  3364.     const UINT MF_REMOVE      = 0x1000;
  3365.  
  3366.     // Menu flags for Add/Check/EnableMenuItem()
  3367.     const UINT MF_BYCOMMAND   = 0x0000;
  3368.     const UINT MF_BYPOSITION   = 0x0400;
  3369.  
  3370.     const UINT MF_SEPARATOR   = 0x0800;
  3371.  
  3372.     const UINT MF_ENABLED     = 0x0000;
  3373.     const UINT MF_GRAYED      = 0x0001;
  3374.     const UINT MF_DISABLED    = 0x0002;
  3375.  
  3376.     const UINT MF_UNCHECKED   = 0x0000;
  3377.     const UINT MF_CHECKED     = 0x0008;
  3378.     const UINT MF_USECHECKBITMAPS  = 0x0200;
  3379.  
  3380.     const UINT MF_STRING      = 0x0000;
  3381.     const UINT MF_BITMAP      = 0x0004;
  3382.     const UINT MF_OWNERDRAW   = 0x0100;
  3383.  
  3384.     const UINT MF_POPUP       = 0x0010;
  3385.     const UINT MF_MENUBARBREAK = 0x0020;
  3386.     const UINT MF_MENUBREAK   = 0x0040;
  3387.  
  3388.     const UINT MF_UNHILITE    = 0x0000;
  3389.     const UINT MF_HILITE      = 0x0080;
  3390.  
  3391.     const UINT MF_SYSMENU     = 0x2000;
  3392.     const UINT MF_HELP        = 0x4000;
  3393.     const UINT MF_MOUSESELECT = H8000; // Hack to get 0x8000
  3394.  
  3395.     const UINT MF_END         = 0x0080; // Only valid in menu resource templates
  3396.  
  3397.     // Flags for TrackPopupMenu
  3398.     const UINT TPM_LEFTBUTTON   = 0x0000;
  3399.     const UINT TPM_RIGHTBUTTON  = 0x0002;
  3400.     const UINT TPM_LEFTALIGN    = 0x0000;
  3401.     const UINT TPM_CENTERALIGN  = 0x0004;
  3402.     const UINT TPM_RIGHTALIGN   = 0x0008;
  3403.  
  3404.     #ifdef WIN32
  3405.  
  3406.     /*
  3407.     // WM_PRINT flags
  3408.     const ULONG PRF_CHECKVISIBLE    = 0x00000001;
  3409.     const ULONG PRF_NONCLIENT       = 0x00000002;
  3410.     const ULONG PRF_CLIENT          = 0x00000004;
  3411.     const ULONG PRF_ERASEBKGND      = 0x00000008;
  3412.     const ULONG PRF_CHILDREN        = 0x00000010;
  3413.     const ULONG PRF_OWNED           = 0x00000020;
  3414.     */
  3415.  
  3416.     // 3D border styles
  3417.     const UINT BDR_RAISEDOUTER  = 0x0001;
  3418.     const UINT BDR_SUNKENOUTER  = 0x0002;
  3419.     const UINT BDR_RAISEDINNER  = 0x0004;
  3420.     const UINT BDR_SUNKENINNER  = 0x0008;
  3421.  
  3422.     const UINT BDR_OUTER        = 0x0003;
  3423.     const UINT BDR_INNER        = 0x000c;
  3424.     const UINT BDR_RAISED       = 0x0005;
  3425.     const UINT BDR_SUNKEN       = 0x000a;
  3426.  
  3427.     const UINT EDGE_RAISED      = 0x0005; // BDR_RAISEDOUTER | BDR_RAISEDINNER
  3428.     const UINT EDGE_SUNKEN      = 0x000a; // BDR_SUNKENOUTER | BDR_SUNKENINNER
  3429.     const UINT EDGE_ETCHED      = 0x0006; // BDR_SUNKENOUTER | BDR_RAISEDINNER
  3430.     const UINT EDGE_BUMP        = 0x0009; // BDR_RAISEDOUTER | BDR_SUNKENINNER
  3431.  
  3432.     // Border flags
  3433.     const UINT BF_LEFT          = 0x0001;
  3434.     const UINT BF_TOP           = 0x0002;
  3435.     const UINT BF_RIGHT         = 0x0004;
  3436.     const UINT BF_BOTTOM        = 0x0008;
  3437.  
  3438.     const UINT BF_TOPLEFT       = 0x0003; // BF_TOP | BF_LEFT
  3439.     const UINT BF_TOPRIGHT      = 0x0006; // BF_TOP | BF_RIGHT
  3440.     const UINT BF_BOTTOMLEFT    = 0x0009; // BF_BOTTOM | BF_LEFT
  3441.     const UINT BF_BOTTOMRIGHT   = 0x000c; // BF_BOTTOM | BF_RIGHT
  3442.     const UINT BF_RECT          = 0x000f; // BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM
  3443.  
  3444.     const UINT BF_DIAGONAL      = 0x0010;
  3445.  
  3446.     // For diagonal lines, the BF_RECT flags specify the end point of the
  3447.     // vector bounded by the rectangle parameter.
  3448.     const UINT BF_DIAGONAL_ENDTOPRIGHT      = 0x0016; // BF_DIAGONAL | BF_TOP | BF_RIGHT
  3449.     const UINT BF_DIAGONAL_ENDTOPLEFT       = 0x0013; // BF_DIAGONAL | BF_TOP | BF_LEFT
  3450.     const UINT BF_DIAGONAL_ENDBOTTOMLEFT    = 0x0019; // BF_DIAGONAL | BF_BOTTOM | BF_LEFT
  3451.     const UINT BF_DIAGONAL_ENDBOTTOMRIGHT   = 0x001c; // BF_DIAGONAL | BF_BOTTOM | BF_RIGHT
  3452.  
  3453.     const UINT BF_MIDDLE    = 0x0800;   // Fill in the middle
  3454.     const UINT BF_SOFT      = 0x1000;   // For softer buttons
  3455.     const UINT BF_ADJUST    = 0x2000;   // Calculate the space left over
  3456.     const UINT BF_FLAT      = 0x4000;   // For flat rather than 3D borders
  3457.     const UINT BF_MONO      = 0x8000;   // For monochrome borders
  3458.  
  3459.     // Flags for DrawFrameControl
  3460.  
  3461.     const UINT DFC_CAPTION          = 1;
  3462.     const UINT DFC_MENU             = 2;
  3463.     const UINT DFC_SCROLL           = 3;
  3464.     const UINT DFC_BUTTON           = 4;
  3465.  
  3466.     const UINT DFCS_CAPTIONCLOSE    = 0x0000;
  3467.     const UINT DFCS_CAPTIONMIN      = 0x0001;
  3468.     const UINT DFCS_CAPTIONMAX      = 0x0002;
  3469.     const UINT DFCS_CAPTIONRESTORE  = 0x0003;
  3470.     const UINT DFCS_CAPTIONHELP     = 0x0004;
  3471.  
  3472.     const UINT DFCS_MENUARROW       = 0x0000;
  3473.     const UINT DFCS_MENUCHECK       = 0x0001;
  3474.     const UINT DFCS_MENUBULLET      = 0x0002;
  3475.     const UINT DFCS_MENUARROWRIGHT  = 0x0004;
  3476.  
  3477.     const UINT DFCS_SCROLLUP        = 0x0000;
  3478.     const UINT DFCS_SCROLLDOWN      = 0x0001;
  3479.     const UINT DFCS_SCROLLLEFT      = 0x0002;
  3480.     const UINT DFCS_SCROLLRIGHT     = 0x0003;
  3481.     const UINT DFCS_SCROLLCOMBOBOX  = 0x0005;
  3482.     const UINT DFCS_SCROLLSIZEGRIP  = 0x0008;
  3483.     const UINT DFCS_SCROLLSIZEGRIPRIGHT = 0x0010;
  3484.  
  3485.     const UINT DFCS_BUTTONCHECK     = 0x0000;
  3486.     const UINT DFCS_BUTTONRADIOIMAGE =  0x0001;
  3487.     const UINT DFCS_BUTTONRADIOMASK = 0x0002;
  3488.     const UINT DFCS_BUTTONRADIO     = 0x0004;
  3489.     const UINT DFCS_BUTTON3STATE    = 0x0008;
  3490.     const UINT DFCS_BUTTONPUSH      = 0x0010;
  3491.  
  3492.     const UINT DFCS_INACTIVE        = 0x0100;
  3493.     const UINT DFCS_PUSHED          = 0x0200;
  3494.     const UINT DFCS_CHECKED         = 0x0400;
  3495.     const UINT DFCS_ADJUSTRECT      = 0x2000;
  3496.     const UINT DFCS_FLAT            = 0x4000;
  3497.     const UINT DFCS_MONO            = 0x8000;
  3498.  
  3499.     // Flags for DrawCaption
  3500.     const UINT DC_ACTIVE        = 0x0001;
  3501.     const UINT DC_SMALLCAP      = 0x0002;
  3502.     const UINT DC_ICON          = 0x0004;
  3503.     const UINT DC_TEXT          = 0x0008;
  3504.     const UINT DC_INBUTTON      = 0x0010;
  3505.     // const UINT DC_CAPTION    = 0x001C;   // (DC_ICON | DC_TEXT | DC_BUTTONS)
  3506.     // const UINT DC_NC         = 0x001C;   // (DC_CAPTION | DC_FRAME)
  3507.  
  3508.     const UINT IDANI_OPEN       = 1;
  3509.     const UINT IDANI_CLOSE      = 2;
  3510.     const UINT IDANI_CAPTION    = 3;
  3511.  
  3512.     #endif
  3513.  
  3514.     [ helpstring("ExitWindows: Restart flag") ]
  3515.     const UINT EW_RESTARTWINDOWS = 0x42;
  3516.     [ helpstring("ExitWindows: Reboot flag") ]
  3517.     const UINT EW_REBOOTSYSTEM   = 0x43;
  3518.     const UINT EW_EXITANDEXECAPP = 0x0044;
  3519.  
  3520.     [ helpstring("ExitWindowsEx: Log off flag") ]
  3521.     const UINT EWX_LOGOFF   = 0x0;
  3522.     [ helpstring("ExitWindowsEx: Shut down flag") ]
  3523.     const UINT EWX_SHUTDOWN = 0x1;
  3524.     [ helpstring("ExitWindowsEx: Shut down and reboot flag") ]
  3525.     const UINT EWX_REBOOT   = 0x2;
  3526.     [ helpstring("ExitWindowsEx: Force termination of applications without prompting flag") ]
  3527.     const UINT EWX_FORCE    = 0x4;
  3528.     [ helpstring("ExitWindowsEx: Shut down and power off flag") ]
  3529.     const UINT EWX_POWEROFF = 0x8;
  3530.  
  3531.  
  3532. }   // End module UserConst
  3533.